Permissions & Authorization for Users #24
Initial Release; Includes Database and MVC refactoring
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
@model Disco.Web.Models.Device.AddOfflineModel
|
||||
@{
|
||||
Authorization.Require(Claims.Device.Actions.EnrolDevices);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Add Offline");
|
||||
|
||||
var hasAssetNumber = Authorization.Has(Claims.Device.Properties.AssetNumber);
|
||||
var hasLocation = Authorization.Has(Claims.Device.Properties.Location);
|
||||
var hasDeviceBatch = Authorization.Has(Claims.Device.Properties.DeviceBatch);
|
||||
var hasDeviceProfile = Authorization.Has(Claims.Device.Properties.DeviceProfile);
|
||||
var hasAssignUser = Authorization.Has(Claims.Device.Actions.AssignUser);
|
||||
|
||||
}
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@@ -8,86 +17,111 @@
|
||||
<div class="form" style="width: 450px">
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Serial Number:
|
||||
<th>Serial Number:
|
||||
</th>
|
||||
<td>
|
||||
@Html.TextBoxFor(model => model.Device.SerialNumber)<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.SerialNumber)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Asset Number:
|
||||
</th>
|
||||
<td>@Html.TextBoxFor(model => model.Device.AssetNumber)<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.AssetNumber)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Location:
|
||||
</th>
|
||||
<td>@Html.TextBoxFor(model => model.Device.Location)<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.Location)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Device Batch:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DropDownListFor(model => model.Device.DeviceBatchId, Model.DeviceBatches.ToSelectListItems()) <br />
|
||||
@Html.ValidationMessageFor(model => model.Device.DeviceBatchId)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Device Profile:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DropDownListFor(model => model.Device.DeviceProfileId, Model.DeviceProfiles.ToSelectListItems(Model.DefaultDeviceProfileId))<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.DeviceProfileId)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Assigned User:
|
||||
</th>
|
||||
<td>
|
||||
@Html.TextBoxFor(model => model.Device.AssignedUserId)<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.AssignedUserId)
|
||||
</td>
|
||||
</tr>
|
||||
@if (hasAssetNumber)
|
||||
{
|
||||
<tr>
|
||||
<th>Asset Number:
|
||||
</th>
|
||||
<td>@Html.TextBoxFor(model => model.Device.AssetNumber)<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.AssetNumber)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (hasLocation)
|
||||
{
|
||||
<tr>
|
||||
<th>Location:
|
||||
</th>
|
||||
<td>@Html.TextBoxFor(model => model.Device.Location)<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.Location)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (hasDeviceBatch)
|
||||
{
|
||||
<tr>
|
||||
<th>Device Batch:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DropDownListFor(model => model.Device.DeviceBatchId, Model.DeviceBatches.ToSelectListItems())
|
||||
<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.DeviceBatchId)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (hasDeviceProfile)
|
||||
{
|
||||
<tr>
|
||||
<th>Device Profile:
|
||||
</th>
|
||||
<td>
|
||||
@Html.DropDownListFor(model => model.Device.DeviceProfileId, Model.DeviceProfiles.ToSelectListItems(Model.DefaultDeviceProfileId))<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.DeviceProfileId)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (hasAssignUser)
|
||||
{
|
||||
<tr>
|
||||
<th>Assigned User:
|
||||
</th>
|
||||
<td>
|
||||
@Html.TextBoxFor(model => model.Device.AssignedUserId)<br />
|
||||
@Html.ValidationMessageFor(model => model.Device.AssignedUserId)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<p class="actions">
|
||||
@if (!hasDeviceProfile)
|
||||
{
|
||||
@Html.Hidden("Device.DeviceProfileId", Model.DefaultDeviceProfileId)
|
||||
}
|
||||
|
||||
<input type="submit" class="button" value="Add" />
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$SerialNumber = $('#Device_SerialNumber');
|
||||
$AssetNumber = $('#Device_AssetNumber');
|
||||
$Location = $('#Device_Location');
|
||||
$AssignedUserId = $('#Device_AssignedUserId');
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $SerialNumber = $('#Device_SerialNumber').focus();
|
||||
|
||||
$SerialNumber.focus().keydown(function (e) {
|
||||
@if (hasAssignUser)
|
||||
{<text>
|
||||
$SerialNumber.keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$AssignedUserId.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$AssetNumber.keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$Location.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$Location.keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$AssignedUserId.focus();
|
||||
$('#Device_AssignedUserId').focus();
|
||||
return false;
|
||||
}
|
||||
});</text>}
|
||||
@if (hasAssetNumber)
|
||||
{<text>
|
||||
$('#Device_AssetNumber').keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
@if (hasLocation)
|
||||
{<text>$('#Device_Location').focus(); return false;</text>}
|
||||
else if (hasAssignUser)
|
||||
{<text>$('#Device_AssignedUserId').focus(); return false;</text>}
|
||||
}
|
||||
});
|
||||
</text>}
|
||||
@if (hasLocation && hasAssignUser)
|
||||
{<text>
|
||||
$('#Device_Location').keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$('#Device_AssignedUserId').focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</text>}
|
||||
@if (hasAssignUser)
|
||||
{<text>
|
||||
var $AssignedUserId = $('#Device_AssignedUserId');
|
||||
$AssignedUserId
|
||||
.watermark('Search Users')
|
||||
.focus(function () { $AssignedUserId.select() })
|
||||
@@ -108,7 +142,8 @@
|
||||
.append("<a><strong>" + item.DisplayName + "</strong><br>" + item.Id + " (" + item.Type + ")</a>")
|
||||
.appendTo(ul);
|
||||
};
|
||||
</text>}
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Device
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Device/AddOffline.cshtml")]
|
||||
public partial class AddOffline : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.AddOfflineModel>
|
||||
public partial class AddOffline : Disco.Services.Web.WebViewPage<Disco.Web.Models.Device.AddOfflineModel>
|
||||
{
|
||||
public AddOffline()
|
||||
{
|
||||
@@ -43,15 +45,24 @@ namespace Disco.Web.Views.Device
|
||||
|
||||
#line 2 "..\..\Views\Device\AddOffline.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Device.Actions.EnrolDevices);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Add Offline");
|
||||
|
||||
var hasAssetNumber = Authorization.Has(Claims.Device.Properties.AssetNumber);
|
||||
var hasLocation = Authorization.Has(Claims.Device.Properties.Location);
|
||||
var hasDeviceBatch = Authorization.Has(Claims.Device.Properties.DeviceBatch);
|
||||
var hasDeviceProfile = Authorization.Has(Claims.Device.Properties.DeviceProfile);
|
||||
var hasAssignUser = Authorization.Has(Claims.Device.Actions.AssignUser);
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Views\Device\AddOffline.cshtml"
|
||||
#line 14 "..\..\Views\Device\AddOffline.cshtml"
|
||||
using (Html.BeginForm())
|
||||
{
|
||||
|
||||
@@ -59,14 +70,14 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Device\AddOffline.cshtml"
|
||||
#line 16 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationSummary(true));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Device\AddOffline.cshtml"
|
||||
#line 16 "..\..\Views\Device\AddOffline.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -78,13 +89,13 @@ WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px\"");
|
||||
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r\n S" +
|
||||
"erial Number:\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>Serial Number:\r\n " +
|
||||
" </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Device\AddOffline.cshtml"
|
||||
#line 23 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.Device.SerialNumber));
|
||||
|
||||
|
||||
@@ -95,132 +106,260 @@ WriteLiteral("<br />\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Device\AddOffline.cshtml"
|
||||
#line 24 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.SerialNumber));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Asset Number:\r\n </th>\r\n <td" +
|
||||
">");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.Device.AssetNumber));
|
||||
#line 27 "..\..\Views\Device\AddOffline.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\Device\AddOffline.cshtml"
|
||||
if (hasAssetNumber)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.AssetNumber));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Location:\r\n </th>\r\n <td>");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.Device.Location));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" <tr>\r\n <th>Asset Number:\r\n " +
|
||||
"</th>\r\n <td>");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.Location));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Device Batch:\r\n </th>\r\n <td" +
|
||||
">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.Device.DeviceBatchId, Model.DeviceBatches.ToSelectListItems()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.DeviceBatchId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Device Profile:\r\n </th>\r\n <" +
|
||||
"td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.Device.DeviceProfileId, Model.DeviceProfiles.ToSelectListItems(Model.DefaultDeviceProfileId)));
|
||||
Write(Html.TextBoxFor(model => model.Device.AssetNumber));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.DeviceProfileId));
|
||||
#line 33 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.AssetNumber));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th" +
|
||||
">\r\n Assigned User:\r\n </th>\r\n <t" +
|
||||
"d>\r\n");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
#line 36 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Device\AddOffline.cshtml"
|
||||
if (hasLocation)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <th>Location:\r\n </th" +
|
||||
">\r\n <td>");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.Device.Location));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.Location));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\Device\AddOffline.cshtml"
|
||||
if (hasDeviceBatch)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <th>Device Batch:\r\n " +
|
||||
"</th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.Device.DeviceBatchId, Model.DeviceBatches.ToSelectListItems()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.DeviceBatchId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.Device.AssignedUserId));
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 59 "..\..\Views\Device\AddOffline.cshtml"
|
||||
if (hasDeviceProfile)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <th>Device Profile:\r\n " +
|
||||
" </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.Device.DeviceProfileId, Model.DeviceProfiles.ToSelectListItems(Model.DefaultDeviceProfileId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 59 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.AssignedUserId));
|
||||
#line 66 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.DeviceProfileId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n <p");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 69 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Device\AddOffline.cshtml"
|
||||
if (hasAssignUser)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <th>Assigned User:\r\n " +
|
||||
" </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 76 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.TextBoxFor(model => model.Device.AssignedUserId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 77 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.ValidationMessageFor(model => model.Device.AssignedUserId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n <p");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n <input");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\Device\AddOffline.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "..\..\Views\Device\AddOffline.cshtml"
|
||||
if (!hasDeviceProfile)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 85 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Html.Hidden("Device.DeviceProfileId", Model.DefaultDeviceProfileId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 85 "..\..\Views\Device\AddOffline.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <input");
|
||||
|
||||
WriteLiteral(" type=\"submit\"");
|
||||
|
||||
@@ -228,35 +367,123 @@ WriteLiteral(" class=\"button\"");
|
||||
|
||||
WriteLiteral(" value=\"Add\"");
|
||||
|
||||
WriteLiteral(" />\r\n </p>\r\n <script");
|
||||
WriteLiteral(" />\r\n </p>\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
$SerialNumber = $('#Device_SerialNumber');
|
||||
$AssetNumber = $('#Device_AssetNumber');
|
||||
$Location = $('#Device_Location');
|
||||
$AssignedUserId = $('#Device_AssignedUserId');
|
||||
WriteLiteral(">\r\n $(function () {\r\n var $SerialNumber = $(\'#D" +
|
||||
"evice_SerialNumber\').focus();\r\n\r\n");
|
||||
|
||||
$SerialNumber.focus().keydown(function (e) {
|
||||
|
||||
#line 94 "..\..\Views\Device\AddOffline.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 94 "..\..\Views\Device\AddOffline.cshtml"
|
||||
if (hasAssignUser)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n $SerialNumber.keydown(function (e) {\r\n if (e" +
|
||||
".which == 13) {\r\n $(\'#Device_AssignedUserId\').focus();\r\n " +
|
||||
" return false;\r\n }\r\n });" +
|
||||
"");
|
||||
|
||||
|
||||
#line 101 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 102 "..\..\Views\Device\AddOffline.cshtml"
|
||||
if (hasAssetNumber)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n $(\'#Device_AssetNumber\').keydown(function (e) {\r\n " +
|
||||
" if (e.which == 13) {\r\n");
|
||||
|
||||
|
||||
#line 106 "..\..\Views\Device\AddOffline.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 106 "..\..\Views\Device\AddOffline.cshtml"
|
||||
if (hasLocation)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("$(\'#Device_Location\').focus(); return false;");
|
||||
|
||||
|
||||
#line 107 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
else if (hasAssignUser)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("$(\'#Device_AssignedUserId\').focus(); return false;");
|
||||
|
||||
|
||||
#line 109 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" }\r\n });\r\n ");
|
||||
|
||||
|
||||
#line 112 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 113 "..\..\Views\Device\AddOffline.cshtml"
|
||||
if (hasLocation && hasAssignUser)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
$('#Device_Location').keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$AssignedUserId.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$AssetNumber.keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$Location.focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$Location.keydown(function (e) {
|
||||
if (e.which == 13) {
|
||||
$AssignedUserId.focus();
|
||||
$('#Device_AssignedUserId').focus();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
");
|
||||
|
||||
|
||||
#line 121 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 122 "..\..\Views\Device\AddOffline.cshtml"
|
||||
if (hasAssignUser)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
var $AssignedUserId = $('#Device_AssignedUserId');
|
||||
$AssignedUserId
|
||||
.watermark('Search Users')
|
||||
.focus(function () { $AssignedUserId.select() })
|
||||
@@ -264,7 +491,7 @@ WriteLiteral(@">
|
||||
source: '");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\Device\AddOffline.cshtml"
|
||||
#line 129 "..\..\Views\Device\AddOffline.cshtml"
|
||||
Write(Url.Action(MVC.API.User.UpstreamUsers()));
|
||||
|
||||
|
||||
@@ -286,13 +513,19 @@ WriteLiteral(@"',
|
||||
.append(""<a><strong>"" + item.DisplayName + ""</strong><br>"" + item.Id + "" ("" + item.Type + "")</a>"")
|
||||
.appendTo(ul);
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
");
|
||||
");
|
||||
|
||||
|
||||
#line 114 "..\..\Views\Device\AddOffline.cshtml"
|
||||
#line 145 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" });\r\n </script>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 149 "..\..\Views\Device\AddOffline.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
@model Disco.Web.Models.Device.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.Device.ShowAssignmentHistory);
|
||||
}
|
||||
<div id="DeviceDetailTab-AssignmentHistory" class="DevicePart">
|
||||
@if (Model.Device.DeviceUserAssignments.Count > 0)
|
||||
{
|
||||
@@ -15,7 +18,14 @@
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(dua.AssignedUser.ToString(), MVC.User.Show(dua.AssignedUserId))
|
||||
@if (Authorization.Has(Claims.User.Show))
|
||||
{
|
||||
@Html.ActionLink(dua.AssignedUser.ToString(), MVC.User.Show(dua.AssignedUserId))
|
||||
}
|
||||
else
|
||||
{
|
||||
@dua.AssignedUser.ToString()
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(dua.AssignedDate)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,19 +28,29 @@ namespace Disco.Web.Views.Device.DeviceParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Device/DeviceParts/_AssignmentHistory.cshtml")]
|
||||
public partial class AssignmentHistory : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
public partial class AssignmentHistory : Disco.Services.Web.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
{
|
||||
public AssignmentHistory()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
#line 2 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Device.ShowAssignmentHistory);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"DeviceDetailTab-AssignmentHistory\"");
|
||||
|
||||
@@ -49,13 +59,13 @@ WriteLiteral(" class=\"DevicePart\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 3 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
#line 6 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 3 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
#line 6 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
if (Model.Device.DeviceUserAssignments.Count > 0)
|
||||
{
|
||||
|
||||
@@ -71,13 +81,13 @@ WriteLiteral(">\r\n <tr>\r\n <th>User\r\n
|
||||
" </th>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
#line 17 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
#line 17 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
foreach (var dua in Model.Device.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate))
|
||||
{
|
||||
|
||||
@@ -86,21 +96,58 @@ WriteLiteral(">\r\n <tr>\r\n <th>User\r\n
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
Write(Html.ActionLink(dua.AssignedUser.ToString(), MVC.User.Show(dua.AssignedUserId)));
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
if (Authorization.Has(Claims.User.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
Write(Html.ActionLink(dua.AssignedUser.ToString(), MVC.User.Show(dua.AssignedUserId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
#line 23 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
Write(dua.AssignedUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(dua.AssignedDate));
|
||||
|
||||
|
||||
@@ -111,7 +158,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
#line 34 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current"));
|
||||
|
||||
|
||||
@@ -120,7 +167,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
#line 37 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +176,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -144,7 +191,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Assignment History Available</span>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
#line 43 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +201,7 @@ WriteLiteral(" <script>\r\n $(\'#DeviceDetailTabItems\').append(\'<li>
|
||||
"ilTab-AssignmentHistory\">Assignment History [");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
#line 45 "..\..\Views\Device\DeviceParts\_AssignmentHistory.cshtml"
|
||||
Write(Model.Device.DeviceUserAssignments.Count);
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
@model Disco.Web.Models.Device.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.Device.ShowCertificates);
|
||||
var hasDownloadCert = Authorization.Has(Claims.Config.DeviceCertificate.DownloadCertificates);
|
||||
}
|
||||
<div id="DeviceDetailTab-Certificates" class="DevicePart">
|
||||
<div class="genericData certificateTable">
|
||||
@if (Model.Certificates.Count() > 0)
|
||||
@@ -18,7 +22,14 @@
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(item.Name, MVC.API.DeviceCertificate.Download(item.Id))
|
||||
@if (hasDownloadCert)
|
||||
{
|
||||
@Html.ActionLink(item.Name, MVC.API.DeviceCertificate.Download(item.Id))
|
||||
}
|
||||
else
|
||||
{
|
||||
@item.Name
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@item.Enabled
|
||||
@@ -41,4 +52,4 @@
|
||||
<script>
|
||||
$('#DeviceDetailTabItems').append('<li><a href="#DeviceDetailTab-Certificates">Certificates [@(Model.Certificates.Count)]</a></li>');
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,19 +28,30 @@ namespace Disco.Web.Views.Device.DeviceParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Device/DeviceParts/_Certificates.cshtml")]
|
||||
public partial class Certificates : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
public partial class Certificates : Disco.Services.Web.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
{
|
||||
public Certificates()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
#line 2 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Device.ShowCertificates);
|
||||
var hasDownloadCert = Authorization.Has(Claims.Config.DeviceCertificate.DownloadCertificates);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"DeviceDetailTab-Certificates\"");
|
||||
|
||||
@@ -53,13 +64,13 @@ WriteLiteral(" class=\"genericData certificateTable\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 4 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 8 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 4 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 8 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
if (Model.Certificates.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -84,13 +95,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 17 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
foreach (var item in Model.Certificates)
|
||||
{
|
||||
|
||||
@@ -99,21 +110,58 @@ WriteLiteral(@">
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(Html.ActionLink(item.Name, MVC.API.DeviceCertificate.Download(item.Id)));
|
||||
#line 25 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 25 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
if (hasDownloadCert)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(Html.ActionLink(item.Name, MVC.API.DeviceCertificate.Download(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(item.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(item.Enabled);
|
||||
|
||||
|
||||
@@ -124,7 +172,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 38 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.AllocatedDate));
|
||||
|
||||
|
||||
@@ -135,7 +183,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 41 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.ExpirationDate));
|
||||
|
||||
|
||||
@@ -144,7 +192,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 44 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +201,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 46 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -168,7 +216,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Certificates Allocated</span>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 50 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -178,13 +226,13 @@ WriteLiteral(" </div>\r\n <script>\r\n $(\'#DeviceDetailTabItems\')
|
||||
"\"#DeviceDetailTab-Certificates\">Certificates [");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
#line 53 "..\..\Views\Device\DeviceParts\_Certificates.cshtml"
|
||||
Write(Model.Certificates.Count);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("]</a></li>\');\r\n </script>\r\n</div>");
|
||||
WriteLiteral("]</a></li>\');\r\n </script>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
@model Disco.Web.Models.Device.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.Device.ShowDetails);
|
||||
}
|
||||
<div id="DeviceDetailTab-Details" class="DevicePart">
|
||||
<div id="DeviceDetailTab-DetailsContainer">
|
||||
<table class="tableData">
|
||||
|
||||
@@ -28,19 +28,29 @@ namespace Disco.Web.Views.Device.DeviceParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Device/DeviceParts/_Details.cshtml")]
|
||||
public partial class Details : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
public partial class Details : Disco.Services.Web.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
{
|
||||
public Details()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
#line 2 "..\..\Views\Device\DeviceParts\_Details.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Device.ShowDetails);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"DeviceDetailTab-Details\"");
|
||||
|
||||
@@ -58,7 +68,7 @@ WriteLiteral(">\r\n <tbody>\r\n <tr>\r\n
|
||||
"ress</th>\r\n <td>");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Device\DeviceParts\_Details.cshtml"
|
||||
#line 11 "..\..\Views\Device\DeviceParts\_Details.cshtml"
|
||||
Write(Model.Device.DeviceDetails.LanMacAddress() ?? "Unknown");
|
||||
|
||||
|
||||
@@ -68,7 +78,7 @@ WriteLiteral("</td>\r\n </tr>\r\n <tr>\r\n
|
||||
"MAC Address</th>\r\n <td>");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Device\DeviceParts\_Details.cshtml"
|
||||
#line 15 "..\..\Views\Device\DeviceParts\_Details.cshtml"
|
||||
Write(Model.Device.DeviceDetails.WLanMacAddress() ?? "Unknown");
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
@model Disco.Web.Models.Device.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.Device.ShowJobs);
|
||||
}
|
||||
<div id="DeviceDetailTab-Jobs" class="DevicePart">
|
||||
<div id="DeviceDetailTab-JobsContainer">
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs)
|
||||
</div>
|
||||
<script>
|
||||
$('#DeviceDetailTabItems').append('<li><a href="#DeviceDetailTab-Jobs">Jobs [@(Model.Device.Jobs == null ? 0 : Model.Device.Jobs.Count)]</a></li>');
|
||||
$('#DeviceDetailTabItems').append('<li><a href="#DeviceDetailTab-Jobs">Jobs [@(Model.Jobs.Items.Count)]</a></li>');
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,19 +28,29 @@ namespace Disco.Web.Views.Device.DeviceParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Device/DeviceParts/_Jobs.cshtml")]
|
||||
public partial class Jobs : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
public partial class Jobs : Disco.Services.Web.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
{
|
||||
public Jobs()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
#line 2 "..\..\Views\Device\DeviceParts\_Jobs.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Device.ShowJobs);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"DeviceDetailTab-Jobs\"");
|
||||
|
||||
@@ -55,7 +65,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 4 "..\..\Views\Device\DeviceParts\_Jobs.cshtml"
|
||||
#line 7 "..\..\Views\Device\DeviceParts\_Jobs.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs));
|
||||
|
||||
|
||||
@@ -65,8 +75,8 @@ WriteLiteral("\r\n </div>\r\n <script>\r\n $(\'#DeviceDetailTabItem
|
||||
"f=\"#DeviceDetailTab-Jobs\">Jobs [");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Device\DeviceParts\_Jobs.cshtml"
|
||||
Write(Model.Device.Jobs == null ? 0 : Model.Device.Jobs.Count);
|
||||
#line 10 "..\..\Views\Device\DeviceParts\_Jobs.cshtml"
|
||||
Write(Model.Jobs.Items.Count);
|
||||
|
||||
|
||||
#line default
|
||||
|
||||
@@ -1,13 +1,23 @@
|
||||
@model Disco.Web.Models.Device.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.Device.ShowAttachments);
|
||||
|
||||
var canAddAttachments = Authorization.Has(Claims.Device.Actions.AddAttachments);
|
||||
var canRemoveAnyAttachments = Authorization.Has(Claims.Device.Actions.RemoveAnyAttachments);
|
||||
var canRemoveOwnAttachments = Authorization.Has(Claims.Device.Actions.RemoveOwnAttachments);
|
||||
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
|
||||
if (Authorization.Has(Claims.Device.Actions.AddAttachments))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
}
|
||||
}
|
||||
<div id="DeviceDetailTab-Resources" class="DevicePart">
|
||||
<table id="deviceShowResources">
|
||||
<tr>
|
||||
<td id="Attachments">
|
||||
<td id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
||||
<div class="attachmentOutput">
|
||||
@if (Model.Device.DeviceAttachments != null)
|
||||
{
|
||||
@@ -21,30 +31,35 @@
|
||||
{ @da.DocumentTemplate.Description}
|
||||
else
|
||||
{ @da.Comments }}
|
||||
</span><span class="author">@da.TechUser.ToString()</span><span class="remove"></span><span class="timestamp" title="@da.Timestamp.ToFullDateTime()">@da.Timestamp.ToFuzzy()</span>
|
||||
</span><span class="author">@da.TechUser.ToString()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId == CurrentUser.Id))
|
||||
{<text><span class="remove"></span></text>}<span class="timestamp" title="@da.Timestamp.ToFullDateTime()">@da.Timestamp.ToFuzzy()</span>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action upload"></span><span class="action photo"></span>
|
||||
</div>
|
||||
@if (canAddAttachments)
|
||||
{
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action upload"></span><span class="action photo"></span>
|
||||
</div>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
@if (canAddAttachments)
|
||||
{<text>
|
||||
//#region Add Attachments
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = addAttachment;
|
||||
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogUpload').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
@@ -57,6 +72,101 @@
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'@(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap)',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{
|
||||
onLoad: function () {
|
||||
if (onLoadNavigation) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(onLoadNavigation);
|
||||
isLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=@(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)))'
|
||||
);
|
||||
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Device.Attachment())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
@if (canRemoveAnyAttachments)
|
||||
{<text>buildAttachment(a, true);</text>}
|
||||
else if (canRemoveOwnAttachments)
|
||||
{<text>buildAttachment(a, (a.AuthorId === '@(CurrentUser.Id)'));</text>}
|
||||
else
|
||||
{<text>buildAttachment(a, false);</text>}
|
||||
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function buildAttachment(a, canRemove) {
|
||||
var t = '<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span>';
|
||||
if (canRemove)
|
||||
t += '<span class="remove"></span>';
|
||||
t += '<span class="timestamp"></span></a>';
|
||||
|
||||
var e = $(t);
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.Device.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Device.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
|
||||
if (canRemove)
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
}
|
||||
|
||||
//#endregion
|
||||
</text>}
|
||||
@if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{<text>
|
||||
//#region Remove Attachments
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
@@ -64,117 +174,50 @@
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'@(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap)',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{
|
||||
onLoad: function () {
|
||||
if (onLoadNavigation) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(onLoadNavigation);
|
||||
isLoaded = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=@(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)))'
|
||||
);
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Device.Attachment())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
|
||||
var e = $('<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span><span class="remove"></span><span class="timestamp"></span></a>');
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.Device.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Device.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
var $dialogRemoveAttachment = $('#dialogRemoveAttachment');
|
||||
$dialogRemoveAttachment.dialog("enable");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("disable");
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Device.AttachmentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$this.hide(300).delay(300).queue(function () {
|
||||
var $this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
Shadowbox.removeCache(this);
|
||||
$this.remove();
|
||||
});
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
var $dialogRemoveAttachment = $('#dialogRemoveAttachment');
|
||||
$dialogRemoveAttachment.dialog("enable");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("disable");
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Device.AttachmentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$this.hide(300).delay(300).queue(function () {
|
||||
var $this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
Shadowbox.removeCache(this);
|
||||
$this.remove();
|
||||
});
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//#endregion
|
||||
</text>}
|
||||
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Device.DeviceParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Device/DeviceParts/_Resources.cshtml")]
|
||||
public partial class Resources : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
public partial class Resources : Disco.Services.Web.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
{
|
||||
public Resources()
|
||||
{
|
||||
@@ -43,9 +45,19 @@ namespace Disco.Web.Views.Device.DeviceParts
|
||||
|
||||
#line 2 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Device.ShowAttachments);
|
||||
|
||||
var canAddAttachments = Authorization.Has(Claims.Device.Actions.AddAttachments);
|
||||
var canRemoveAnyAttachments = Authorization.Has(Claims.Device.Actions.RemoveAnyAttachments);
|
||||
var canRemoveOwnAttachments = Authorization.Has(Claims.Device.Actions.RemoveOwnAttachments);
|
||||
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
|
||||
if (Authorization.Has(Claims.Device.Actions.AddAttachments))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -64,6 +76,16 @@ WriteLiteral(">\r\n <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" id=\"Attachments\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 796), Tuple.Create("\"", 871)
|
||||
|
||||
#line 20 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 804), Tuple.Create<System.Object, System.Int32>(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 804), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentOutput\"");
|
||||
@@ -71,13 +93,13 @@ WriteLiteral(" class=\"attachmentOutput\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 22 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (Model.Device.DeviceAttachments != null)
|
||||
{
|
||||
foreach (var da in Model.Device.DeviceAttachments)
|
||||
@@ -88,20 +110,20 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 634), Tuple.Create("\"", 694)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1141), Tuple.Create("\"", 1201)
|
||||
|
||||
#line 16 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 641), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
|
||||
#line 26 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1148), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentDownload(da.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 641), false)
|
||||
, 1148), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 26 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Id);
|
||||
|
||||
|
||||
@@ -112,7 +134,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-mimetype=\"");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 26 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.MimeType);
|
||||
|
||||
|
||||
@@ -124,68 +146,68 @@ WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 800), Tuple.Create("\"", 820)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1307), Tuple.Create("\"", 1327)
|
||||
|
||||
#line 17 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 808), Tuple.Create<System.Object, System.Int32>(da.Filename
|
||||
#line 27 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1315), Tuple.Create<System.Object, System.Int32>(da.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 808), false)
|
||||
, 1315), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 887), Tuple.Create("\"", 949)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 1394), Tuple.Create("\"", 1456)
|
||||
|
||||
#line 18 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 893), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
|
||||
#line 28 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1400), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.Device.AttachmentThumbnail(da.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 893), false)
|
||||
, 1400), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1012), Tuple.Create("\"", 1032)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1519), Tuple.Create("\"", 1539)
|
||||
|
||||
#line 19 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1020), Tuple.Create<System.Object, System.Int32>(da.Comments
|
||||
#line 29 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1527), Tuple.Create<System.Object, System.Int32>(da.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1020), false)
|
||||
, 1527), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 30 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 20 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 30 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(da.DocumentTemplateId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.DocumentTemplate.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 31 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -193,14 +215,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 33 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Comments);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 33 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -212,35 +234,52 @@ WriteLiteral(" class=\"author\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 34 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.TechUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span><span");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral(" class=\"remove\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1422), Tuple.Create("\"", 1460)
|
||||
|
||||
#line 24 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1430), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
|
||||
#line 34 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && da.TechUserId == CurrentUser.Id))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1430), false)
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"remove\"");
|
||||
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2125), Tuple.Create("\"", 2163)
|
||||
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2133), Tuple.Create<System.Object, System.Int32>(da.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2133), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Timestamp.ToFuzzy());
|
||||
#line 35 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(da.Timestamp.ToFuzzy());
|
||||
|
||||
|
||||
#line default
|
||||
@@ -248,18 +287,34 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n </a> \r\n");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 37 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <div");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentInput clearfix\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"action upload\"");
|
||||
|
||||
@@ -267,56 +322,93 @@ WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"action photo\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </div>\r\n <script");
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n Shadowbox.init({\r\n skipSetup: true," +
|
||||
"\r\n modal: true\r\n });\r\n " +
|
||||
" $(function () {\r\n if (!document.DiscoFunctions) {\r\n " +
|
||||
" document.DiscoFunctions = {};\r\n " +
|
||||
" }\r\n document.DiscoFunctions.addAttachment = addAttachmen" +
|
||||
"t;\r\n\r\n $Attachments = $(\'#Attachments\');\r\n " +
|
||||
" $attachmentOutput = $Attachments.find(\'.attachmentOutput\');\r\n\r\n " +
|
||||
" $attachmentOutput.find(\'span.remove\').click(removeAttachment);\r\n" +
|
||||
"\r\n $(\'#dialogUpload\').dialog({\r\n " +
|
||||
" autoOpen: false,\r\n draggable: false,\r\n " +
|
||||
" modal: true,\r\n resizable: false,\r\n " +
|
||||
" width: 860,\r\n height: 550,\r\n" +
|
||||
" close: function () {\r\n " +
|
||||
" silverlightUploadAttachment.content.Navigator.Navigate(\'/Hidden\');\r\n " +
|
||||
" }\r\n });\r\n\r\n $(\'#" +
|
||||
"dialogRemoveAttachment\').dialog({\r\n resizable: false," +
|
||||
"\r\n height: 140,\r\n modal: t" +
|
||||
"rue,\r\n autoOpen: false\r\n });\r\n" +
|
||||
"\r\n var onLoadNavigation = null;\r\n " +
|
||||
"var isLoaded = null;\r\n Silverlight.createObject(\r\n " +
|
||||
" \'");
|
||||
WriteLiteral(@">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 55 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 55 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
//#region Add Attachments
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = addAttachment;
|
||||
|
||||
$('#dialogUpload').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{
|
||||
onLoad: function () {
|
||||
if (onLoadNavigation) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(onLoadNavigation);
|
||||
isLoaded = true;
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
{
|
||||
onLoad: function () {
|
||||
if (onLoadNavigation) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(onLoadNavigation);
|
||||
isLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'UploadUrl=");
|
||||
},
|
||||
'UploadUrl=");
|
||||
|
||||
|
||||
#line 82 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)));
|
||||
#line 92 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)));
|
||||
|
||||
|
||||
#line default
|
||||
@@ -324,124 +416,261 @@ WriteLiteral(@"',
|
||||
WriteLiteral(@"'
|
||||
);
|
||||
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '");
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 105 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.Attachment()));
|
||||
#line 116 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.Attachment()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
|
||||
var e = $('<a><span class=""icon""><img alt=""Attachment Thumbnail"" /></span><span class=""comments""></span><span class=""author""></span><span class=""remove""></span><span class=""timestamp""></span></a>');
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
");
|
||||
|
||||
|
||||
#line 114 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentDownload()));
|
||||
#line 122 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 122 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("buildAttachment(a, true);");
|
||||
|
||||
|
||||
#line 123 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
else if (canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
||||
|
||||
|
||||
#line 125 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(CurrentUser.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', " +
|
||||
"\'");
|
||||
WriteLiteral("\'));");
|
||||
|
||||
|
||||
#line 115 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentThumbnail()));
|
||||
#line 125 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("buildAttachment(a, false);");
|
||||
|
||||
|
||||
#line 127 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Comme" +
|
||||
"nts);\r\n e.find(\'.author\').text(a.Author);\r\n " +
|
||||
" e.find(\'.timestamp\').text(a.TimestampFuzzy).at" +
|
||||
"tr(\'title\', a.TimestampFull);\r\n e.find(\'.remo" +
|
||||
"ve\').click(removeAttachment);\r\n if (!quick)\r\n" +
|
||||
" e.hide();\r\n " +
|
||||
" $attachmentOutput.append(e);\r\n if (!qu" +
|
||||
"ick)\r\n e.show(\'slow\');\r\n " +
|
||||
" if (a.MimeType.toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" e.shadowbox({ gallery: \'attachments\', player: \'" +
|
||||
"img\', title: a.Comments });\r\n } else {\r\n " +
|
||||
" alert(\'Unable to add attachment: \' + d.Result);\r\n " +
|
||||
" }\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to add attachment: \' + textStatus);\r\n " +
|
||||
" }\r\n });\r\n }\r\n " +
|
||||
" function removeAttachment() {\r\n $this = $(this)." +
|
||||
"closest(\'a\');\r\n\r\n var data = { id: $this.attr(\'data-attac" +
|
||||
"hmentid\') };\r\n var $dialogRemoveAttachment = $(\'#dialogRe" +
|
||||
"moveAttachment\');\r\n $dialogRemoveAttachment.dialog(\"enabl" +
|
||||
"e\");\r\n $dialogRemoveAttachment.dialog(\'option\', \'buttons\'" +
|
||||
", {\r\n \"Remove\": function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"disable\");\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" $.ajax({\r\n url: \'");
|
||||
WriteLiteral(@"
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function buildAttachment(a, canRemove) {
|
||||
var t = '<a><span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteLiteral("><img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteLiteral(" /></span><span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"author\"");
|
||||
|
||||
WriteLiteral("></span>\';\r\n if (canRemove)\r\n " +
|
||||
" t += \'<span");
|
||||
|
||||
WriteLiteral(" class=\"remove\"");
|
||||
|
||||
WriteLiteral("></span>\';\r\n t += \'<span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteLiteral("></span></a>\';\r\n\r\n var e = $(t);\r\n\r\n " +
|
||||
" e.attr(\'data-attachmentid\', a.Id).attr(\'data-mimetype\', a.MimeType).at" +
|
||||
"tr(\'href\', \'");
|
||||
|
||||
|
||||
#line 147 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
||||
Write(Url.Action(MVC.API.Device.AttachmentDownload()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n success: function" +
|
||||
" (d) {\r\n if (d == \'OK\') {\r\n " +
|
||||
" $this.hide(300).delay(300).queue(function () {\r\n " +
|
||||
" var $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-mimetype\').toLowerCase(" +
|
||||
").indexOf(\'image/\') == 0)\r\n S" +
|
||||
"hadowbox.removeCache(this);\r\n $th" +
|
||||
"is.remove();\r\n });\r\n " +
|
||||
" } else {\r\n ale" +
|
||||
"rt(\'Unable to remove attachment: \' + d);\r\n " +
|
||||
" }\r\n $dialogRemoveAttachment.dialog(\"clo" +
|
||||
"se\");\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n " +
|
||||
" },\r\n \"Cancel\": function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n\r\n $dialogR" +
|
||||
"emoveAttachment.dialog(\'open\');\r\n\r\n return false;\r\n " +
|
||||
" }\r\n\r\n $attachmentOutput.children(\'a\').each(func" +
|
||||
"tion () {\r\n $this = $(this);\r\n if " +
|
||||
"($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" $this.shadowbox({ gallery: \'attachments\', player: \'img\', title: " +
|
||||
"$this.find(\'.comments\').text() });\r\n });\r\n });" +
|
||||
"\r\n </script>\r\n </td>\r\n </tr>\r\n </table>\r\n " +
|
||||
" <div");
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', \'");
|
||||
|
||||
|
||||
#line 148 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentThumbnail()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
|
||||
if (canRemove)
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
}
|
||||
|
||||
//#endregion
|
||||
");
|
||||
|
||||
|
||||
#line 164 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 165 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
//#region Remove Attachments
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
var $dialogRemoveAttachment = $('#dialogRemoveAttachment');
|
||||
$dialogRemoveAttachment.dialog(""enable"");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
""Remove"": function () {
|
||||
$dialogRemoveAttachment.dialog(""disable"");
|
||||
$dialogRemoveAttachment.dialog(""option"", ""buttons"", null);
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 188 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n succe" +
|
||||
"ss: function (d) {\r\n if (d == \'OK\') {" +
|
||||
"\r\n $this.hide(300).delay(300).que" +
|
||||
"ue(function () {\r\n var $this " +
|
||||
"= $(this);\r\n if ($this.attr(\'" +
|
||||
"data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" Shadowbox.removeCache(this);\r\n " +
|
||||
" $this.remove();\r\n " +
|
||||
" });\r\n } else {\r\n " +
|
||||
" alert(\'Unable to remove attachment:" +
|
||||
" \' + d);\r\n }\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" },\r\n error: functi" +
|
||||
"on (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n " +
|
||||
" },\r\n \"Cancel\": function () {\r\n" +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\'open\');\r\n\r\n " +
|
||||
" return false;\r\n }\r\n //#endr" +
|
||||
"egion\r\n ");
|
||||
|
||||
|
||||
#line 220 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div");
|
||||
|
||||
WriteLiteral(" id=\"dialogUpload\"");
|
||||
|
||||
@@ -468,7 +697,7 @@ WriteLiteral("></span>\r\n Are you sure?\r\n </p>\r\n </div
|
||||
"id=\"DeviceDetailTab-ResourcesLink\">Attachments [");
|
||||
|
||||
|
||||
#line 200 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
#line 243 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
|
||||
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@model Disco.Web.Models.Device.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.Device.Show);
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
}
|
||||
<table id="Device_Show_Subjects">
|
||||
@@ -23,19 +25,42 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Asset:</td>
|
||||
<td>@Html.TextBoxFor(m => m.Device.AssetNumber, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()</td>
|
||||
<td>
|
||||
@if (Authorization.Has(Claims.Device.Properties.AssetNumber))
|
||||
{
|
||||
@Html.TextBoxFor(m => m.Device.AssetNumber, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="small discreet">@Model.Device.AssetNumber</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Location:</td>
|
||||
<td>@Html.TextBoxFor(m => m.Device.Location, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()</td>
|
||||
<td>
|
||||
@if (Authorization.Has(Claims.Device.Properties.Location))
|
||||
{
|
||||
@Html.TextBoxFor(m => m.Device.Location, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="small discreet">@Model.Device.Location</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<script>
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper($('#Device_AssetNumber'), 'Unknown', '@Url.Action(MVC.API.Device.UpdateAssetNumber(Model.Device.SerialNumber, null))', 'AssetNumber');
|
||||
document.DiscoFunctions.PropertyChangeHelper($('#Device_Location'), 'Unknown', '@Url.Action(MVC.API.Device.UpdateLocation(Model.Device.SerialNumber, null))', 'Location');
|
||||
});
|
||||
</script>
|
||||
@if (Authorization.HasAny(Claims.Device.Properties.AssetNumber, Claims.Device.Properties.Location))
|
||||
{
|
||||
<script>
|
||||
$(function () {
|
||||
@if (Authorization.Has(Claims.Device.Properties.AssetNumber))
|
||||
{<text>document.DiscoFunctions.PropertyChangeHelper($('#Device_AssetNumber'), 'Unknown', '@Url.Action(MVC.API.Device.UpdateAssetNumber(Model.Device.SerialNumber, null))', 'AssetNumber');</text>}
|
||||
@if (Authorization.Has(Claims.Device.Properties.Location))
|
||||
{<text>document.DiscoFunctions.PropertyChangeHelper($('#Device_Location'), 'Unknown', '@Url.Action(MVC.API.Device.UpdateLocation(Model.Device.SerialNumber, null))', 'Location');</text>}
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
<div id="Device_Show_Details_Dates" class="status">
|
||||
<table class="none verticalHeadings">
|
||||
@@ -146,7 +171,7 @@
|
||||
{
|
||||
<div id="Device_Show_User">
|
||||
<div id="Device_Show_User_DisplayName" title="Display Name">@Html.ActionLink(assignedUser.DisplayName, MVC.User.Show(assignedUser.Id))</div>
|
||||
<div id="Device_Show_User_Id" title="Id">@assignedUser.Id <span id="Device_Show_User_Type" title="Type">[@(assignedUser.Type)]</span></div>
|
||||
<div id="Device_Show_User_Id" title="Id">@assignedUser.Id</div>
|
||||
@if (!string.IsNullOrWhiteSpace(assignedUser.PhoneNumber))
|
||||
{
|
||||
<div id="Device_Show_User_PhoneNumber" title="Phone Number">@assignedUser.PhoneNumber</div>
|
||||
@@ -165,11 +190,13 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="Device_Show_GenerateDocument_Container" class="status">
|
||||
@Html.DropDownList("Device_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.Device.GeneratePdf(Model.Device.SerialNumber.ToString(), null))?DocumentTemplateId=';
|
||||
@if (Authorization.Has(Claims.Device.Actions.GenerateDocuments))
|
||||
{
|
||||
<div id="Device_Show_GenerateDocument_Container" class="status">
|
||||
@Html.DropDownList("Device_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.Device.GeneratePdf(Model.Device.SerialNumber.ToString(), null))?DocumentTemplateId=';
|
||||
var $documentTemplates = $('#Device_Show_GenerateDocument');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
@@ -179,8 +206,9 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
<td id="Device_Show_Policies" rowspan="2">
|
||||
@@ -602,7 +630,7 @@
|
||||
{
|
||||
<li>
|
||||
<input type="radio" id="Device_Show_Device_Actions_Decommission_Reason_@((int)decommissionReason)"
|
||||
name="Device_Show_Device_Actions_Decommission_Reason" value="@((int)decommissionReason)" @((decommissionReason== Device.DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty)/>
|
||||
name="Device_Show_Device_Actions_Decommission_Reason" value="@((int)decommissionReason)" @((decommissionReason == Device.DecommissionReasons.EndOfLife) ? "checked=\"checked\"" : string.Empty)/>
|
||||
<label for="Device_Show_Device_Actions_Decommission_Reason_@((int)decommissionReason)">@(decommissionReason.ReasonMessage())</label>
|
||||
</li>
|
||||
}
|
||||
@@ -627,7 +655,7 @@
|
||||
"Decommission": function () {
|
||||
|
||||
var reasonId = buttonDialog.find('input:checked').val();
|
||||
|
||||
|
||||
var $this = $(this);
|
||||
$this.dialog("disable");
|
||||
$this.dialog("option", "buttons", null);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,10 @@
|
||||
@model Disco.Web.Models.Device.ImportModel
|
||||
@{
|
||||
Authorization.RequireAny(Claims.Device.Actions.Import, Claims.Device.Actions.Export);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Import/Export Devices");
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.Actions.Import)){
|
||||
<div id="deviceImport">
|
||||
@using (Html.BeginForm(MVC.API.Device.ImportParse(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
@@ -185,8 +188,10 @@
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Export All Devices", MVC.API.Device.ExportAllDevices())
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.Actions.Export)){
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Export All Devices", MVC.API.Device.ExportAllDevices())
|
||||
</div>
|
||||
}
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Device
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Device/ImportExport.cshtml")]
|
||||
public partial class ImportExport : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ImportModel>
|
||||
public partial class ImportExport : Disco.Services.Web.WebViewPage<Disco.Web.Models.Device.ImportModel>
|
||||
{
|
||||
public ImportExport()
|
||||
{
|
||||
@@ -43,25 +45,36 @@ namespace Disco.Web.Views.Device
|
||||
|
||||
#line 2 "..\..\Views\Device\ImportExport.cshtml"
|
||||
|
||||
Authorization.RequireAny(Claims.Device.Actions.Import, Claims.Device.Actions.Export);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Import/Export Devices");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Device\ImportExport.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Actions.Import)){
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" id=\"deviceImport\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 9 "..\..\Views\Device\ImportExport.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 6 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 9 "..\..\Views\Device\ImportExport.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Device.ImportParse(), FormMethod.Post, new { enctype = "multipart/form-data" }))
|
||||
{
|
||||
|
||||
@@ -69,14 +82,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 11 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(Html.ValidationSummary());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 11 "..\..\Views\Device\ImportExport.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -96,7 +109,7 @@ WriteLiteral(">\r\n <h2>Import Devices</h2>\r\n <table>\r\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 17 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(Html.LabelFor(m => m.ImportFile));
|
||||
|
||||
|
||||
@@ -131,7 +144,7 @@ WriteLiteral(" value=\"Import\"");
|
||||
WriteLiteral(" />\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 28 "..\..\Views\Device\ImportExport.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +209,7 @@ WriteLiteral(" class=\"code\"");
|
||||
WriteLiteral(">1</span> [");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 54 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(Html.ActionLink(Model.DeviceModels[0].ToString(), MVC.Config.DeviceModel.Index(Model.DeviceModels[0].Id)));
|
||||
|
||||
|
||||
@@ -220,7 +233,7 @@ WriteLiteral(" class=\"code\"");
|
||||
WriteLiteral(">1</span> [");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 59 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(Html.ActionLink(Model.DeviceProfiles[0].ToString(), MVC.Config.DeviceProfile.Index(Model.DeviceProfiles[0].Id)));
|
||||
|
||||
|
||||
@@ -291,13 +304,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 94 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 97 "..\..\Views\Device\ImportExport.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 94 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 97 "..\..\Views\Device\ImportExport.cshtml"
|
||||
foreach (var dm in Model.DeviceModels)
|
||||
{
|
||||
|
||||
@@ -307,7 +320,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" <tr>\r\n <td>");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 100 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(Html.ActionLink(dm.Id.ToString(), MVC.Config.DeviceModel.Index(dm.Id)));
|
||||
|
||||
|
||||
@@ -316,7 +329,7 @@ WriteLiteral(" <tr>\r\n <td>")
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 101 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(dm.ToString());
|
||||
|
||||
|
||||
@@ -325,7 +338,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 99 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 102 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(dm.Manufacturer);
|
||||
|
||||
|
||||
@@ -334,7 +347,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 100 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 103 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(dm.Model);
|
||||
|
||||
|
||||
@@ -343,7 +356,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 102 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 105 "..\..\Views\Device\ImportExport.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -374,13 +387,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 118 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 121 "..\..\Views\Device\ImportExport.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 118 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 121 "..\..\Views\Device\ImportExport.cshtml"
|
||||
foreach (var dp in Model.DeviceProfiles)
|
||||
{
|
||||
|
||||
@@ -390,7 +403,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" <tr>\r\n <td>");
|
||||
|
||||
|
||||
#line 121 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 124 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(Html.ActionLink(dp.Id.ToString(), MVC.Config.DeviceProfile.Index(dp.Id)));
|
||||
|
||||
|
||||
@@ -399,7 +412,7 @@ WriteLiteral(" <tr>\r\n <td>")
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 122 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 125 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(dp.Name);
|
||||
|
||||
|
||||
@@ -408,7 +421,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 123 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 126 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(dp.ShortName);
|
||||
|
||||
|
||||
@@ -417,7 +430,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 124 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 127 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(dp.Description);
|
||||
|
||||
|
||||
@@ -426,7 +439,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 126 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 129 "..\..\Views\Device\ImportExport.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -456,13 +469,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 141 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 144 "..\..\Views\Device\ImportExport.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 141 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 144 "..\..\Views\Device\ImportExport.cshtml"
|
||||
foreach (var db in Model.DeviceBatches)
|
||||
{
|
||||
|
||||
@@ -472,7 +485,7 @@ WriteLiteral(@">
|
||||
WriteLiteral(" <tr>\r\n <td>");
|
||||
|
||||
|
||||
#line 144 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 147 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(Html.ActionLink(db.Id.ToString(), MVC.Config.DeviceBatch.Index(db.Id)));
|
||||
|
||||
|
||||
@@ -481,7 +494,7 @@ WriteLiteral(" <tr>\r\n <td>")
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 145 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 148 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(db.Name);
|
||||
|
||||
|
||||
@@ -490,7 +503,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 146 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 149 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(db.PurchaseDate));
|
||||
|
||||
|
||||
@@ -499,7 +512,7 @@ WriteLiteral("</td>\r\n <td>");
|
||||
WriteLiteral("</td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 148 "..\..\Views\Device\ImportExport.cshtml"
|
||||
#line 151 "..\..\Views\Device\ImportExport.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -524,23 +537,45 @@ WriteLiteral(" </tbody>\r\n </table>\r\n </div>
|
||||
"efault();\r\n if (!$showDeviceBatchesDialog)\r\n " +
|
||||
" $showDeviceBatchesDialog = $(\'#showDeviceBatchesDialog\').dialog(dialogOpt" +
|
||||
"ions);\r\n $showDeviceBatchesDialog.dialog(\'open\');\r\n " +
|
||||
" });\r\n });\r\n </script>\r\n </div>\r\n\r\n <div");
|
||||
" });\r\n });\r\n </script>\r\n </div>\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 192 "..\..\Views\Device\ImportExport.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 193 "..\..\Views\Device\ImportExport.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Actions.Export)){
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 190 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(Html.ActionLinkButton("Export All Devices", MVC.API.Device.ExportAllDevices()));
|
||||
#line 195 "..\..\Views\Device\ImportExport.cshtml"
|
||||
Write(Html.ActionLinkButton("Export All Devices", MVC.API.Device.ExportAllDevices()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n</div>\r\n");
|
||||
WriteLiteral("\r\n</div>\r\n");
|
||||
|
||||
|
||||
#line 197 "..\..\Views\Device\ImportExport.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
@model Disco.Web.Models.Device.ImportReviewModel
|
||||
@using Disco.BI.DeviceBI.Importing
|
||||
@{
|
||||
Authorization.Require(Claims.Device.Actions.Import);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Import Devices", MVC.Device.ImportExport(), string.Format("File: {0}", Model.ImportFilename));
|
||||
|
||||
int importDeviceOkCount = Model.ImportDevices.Count(id => id.Errors.Count == 0);
|
||||
|
||||
@@ -34,12 +34,14 @@ namespace Disco.Web.Views.Device
|
||||
#line hidden
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Device/ImportReview.cshtml")]
|
||||
public partial class ImportReview : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ImportReviewModel>
|
||||
public partial class ImportReview : Disco.Services.Web.WebViewPage<Disco.Web.Models.Device.ImportReviewModel>
|
||||
{
|
||||
public ImportReview()
|
||||
{
|
||||
@@ -49,6 +51,8 @@ namespace Disco.Web.Views.Device
|
||||
|
||||
#line 3 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Device.Actions.Import);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Devices", MVC.Device.Index(), "Import Devices", MVC.Device.ImportExport(), string.Format("File: {0}", Model.ImportFilename));
|
||||
|
||||
int importDeviceOkCount = Model.ImportDevices.Count(id => id.Errors.Count == 0);
|
||||
@@ -66,13 +70,13 @@ WriteLiteral(" id=\"deviceImportReview\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 14 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 14 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (Model.ImportDevices.Count > 0)
|
||||
{
|
||||
|
||||
@@ -82,7 +86,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" <h2>Parsed ");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 16 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Model.ImportDevices.Count);
|
||||
|
||||
|
||||
@@ -91,7 +95,7 @@ WriteLiteral(" <h2>Parsed ");
|
||||
WriteLiteral(" Device Record");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 16 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Model.ImportDevices.Count != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -104,7 +108,7 @@ WriteLiteral(" <h4>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 18 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(importDeviceOkCount);
|
||||
|
||||
|
||||
@@ -113,7 +117,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" of ");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 18 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Model.ImportDevices.Count);
|
||||
|
||||
|
||||
@@ -122,7 +126,7 @@ WriteLiteral(" of ");
|
||||
WriteLiteral(" Device");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 18 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Model.ImportDevices.Count != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -131,7 +135,7 @@ WriteLiteral(" Device");
|
||||
WriteLiteral(" are ready for import.\r\n </h4>\r\n");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 20 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (importDeviceErrorCount > 0)
|
||||
{
|
||||
|
||||
@@ -147,7 +151,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 23 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(importDeviceErrorCount);
|
||||
|
||||
|
||||
@@ -156,7 +160,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" Record");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 23 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(importDeviceErrorCount != 1 ? "s" : null);
|
||||
|
||||
|
||||
@@ -165,7 +169,7 @@ WriteLiteral(" Record");
|
||||
WriteLiteral(" will be skipped if the import continues\r\n </h4>\r\n");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 25 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -183,13 +187,13 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 29 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 29 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (importDeviceNewCount > 0)
|
||||
{
|
||||
|
||||
@@ -214,7 +218,7 @@ WriteLiteral(" for=\"devicesNavigationNew\"");
|
||||
WriteLiteral(">Show New Devices (");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 31 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Model.ImportDevices.Count(id => id.Errors.Count == 0 && id.Device == null));
|
||||
|
||||
|
||||
@@ -223,13 +227,13 @@ WriteLiteral(">Show New Devices (");
|
||||
WriteLiteral(")</label>\r\n </li>");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 32 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 30 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 32 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (importDeviceUpdateCount > 0)
|
||||
{
|
||||
|
||||
@@ -254,7 +258,7 @@ WriteLiteral(" for=\"devicesNavigationUpdate\"");
|
||||
WriteLiteral(">Show Updates (");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 34 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Model.ImportDevices.Count(id => id.Errors.Count == 0 && id.Device != null));
|
||||
|
||||
|
||||
@@ -263,13 +267,13 @@ WriteLiteral(">Show Updates (");
|
||||
WriteLiteral(")</label>\r\n </li>");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 35 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 35 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (importDeviceErrorCount > 0)
|
||||
{
|
||||
|
||||
@@ -294,7 +298,7 @@ WriteLiteral(" for=\"devicesNavigationError\"");
|
||||
WriteLiteral(">Show Errors (");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 37 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Model.ImportDevices.Count(id => id.Errors.Count != 0));
|
||||
|
||||
|
||||
@@ -303,7 +307,7 @@ WriteLiteral(">Show Errors (");
|
||||
WriteLiteral(")</label>\r\n </li>");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 38 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -341,7 +345,7 @@ WriteLiteral(@" </ul>
|
||||
");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 68 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -391,13 +395,13 @@ WriteLiteral(">Asset Number</th>\r\n </tr>\r\n </thead
|
||||
"dy>\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 84 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 82 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 84 "..\..\Views\Device\ImportReview.cshtml"
|
||||
foreach (var device in Model.ImportDevices)
|
||||
{
|
||||
bool isUpdate = device.Device != null;
|
||||
@@ -408,15 +412,15 @@ WriteLiteral(">Asset Number</th>\r\n </tr>\r\n </thead
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4390), Tuple.Create("\"", 4428)
|
||||
, Tuple.Create(Tuple.Create("", 4398), Tuple.Create("status", 4398), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 4454), Tuple.Create("\"", 4492)
|
||||
, Tuple.Create(Tuple.Create("", 4462), Tuple.Create("status", 4462), true)
|
||||
|
||||
#line 86 "..\..\Views\Device\ImportReview.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4404), Tuple.Create<System.Object, System.Int32>(device.ImportStatus()
|
||||
#line 88 "..\..\Views\Device\ImportReview.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4468), Tuple.Create<System.Object, System.Int32>(device.ImportStatus()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4404), false)
|
||||
, 4468), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <td");
|
||||
@@ -428,7 +432,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 88 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 90 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write((Model.ImportDevices.IndexOf(device) + 1));
|
||||
|
||||
|
||||
@@ -443,7 +447,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 91 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 93 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(device.ImportStatus());
|
||||
|
||||
|
||||
@@ -456,13 +460,13 @@ WriteLiteral(" class=\"serialNumber\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 94 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 96 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 94 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 96 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (device.Device == null)
|
||||
{
|
||||
|
||||
@@ -470,14 +474,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 96 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 98 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 96 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 98 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
@@ -487,14 +491,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 100 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 102 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Html.ActionLink(device.SerialNumber, MVC.Device.Show(device.SerialNumber), new { target = "_blank" }));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 100 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 102 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -504,13 +508,13 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 105 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 103 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 105 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (device.Errors.TryGetValue("SerialNumber", out error))
|
||||
{
|
||||
|
||||
@@ -524,7 +528,7 @@ WriteLiteral(" class=\"error\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 105 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 107 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(error);
|
||||
|
||||
|
||||
@@ -533,7 +537,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 106 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 108 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -546,13 +550,13 @@ WriteLiteral(" class=\"model\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 109 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 111 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 109 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 111 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (device.Errors.TryGetValue("DeviceModelId", out error))
|
||||
{
|
||||
|
||||
@@ -566,7 +570,7 @@ WriteLiteral(" class=\"error\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 111 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 113 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(error);
|
||||
|
||||
|
||||
@@ -575,7 +579,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 112 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 114 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -591,33 +595,33 @@ WriteLiteral(" class=\"modelImage\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 5949), Tuple.Create("\"", 6048)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 6013), Tuple.Create("\"", 6112)
|
||||
|
||||
#line 117 "..\..\Views\Device\ImportReview.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5955), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(device.DeviceModel.Id, device.DeviceModel.ImageHash()))
|
||||
#line 119 "..\..\Views\Device\ImportReview.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6019), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(device.DeviceModel.Id, device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5955), false)
|
||||
, 6019), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 118 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 120 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 118 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 120 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(device.DeviceModel.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 118 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 120 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
@@ -633,7 +637,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Change</span>\r\n");
|
||||
|
||||
|
||||
#line 123 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 125 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,13 +650,13 @@ WriteLiteral(" class=\"profile\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 126 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 128 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 126 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 128 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (device.Errors.TryGetValue("DeviceProfileId", out error))
|
||||
{
|
||||
|
||||
@@ -666,7 +670,7 @@ WriteLiteral(" class=\"error\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 128 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 130 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(error);
|
||||
|
||||
|
||||
@@ -675,7 +679,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 129 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 131 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -686,14 +690,14 @@ WriteLiteral("</div>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 134 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 136 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(device.DeviceProfile.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 134 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 136 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
@@ -709,7 +713,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Change</span>\r\n");
|
||||
|
||||
|
||||
#line 139 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 141 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,13 +726,13 @@ WriteLiteral(" class=\"batch\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 142 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 144 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 142 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 144 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (device.Errors.TryGetValue("DeviceBatchId", out error))
|
||||
{
|
||||
|
||||
@@ -742,7 +746,7 @@ WriteLiteral(" class=\"error\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 144 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 146 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(error);
|
||||
|
||||
|
||||
@@ -751,7 +755,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 145 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 147 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -770,7 +774,7 @@ WriteLiteral("<None>");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 153 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 155 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -779,14 +783,14 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 156 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 158 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(device.DeviceBatch.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 156 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 158 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
}
|
||||
}
|
||||
@@ -803,7 +807,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Change</span>\r\n");
|
||||
|
||||
|
||||
#line 162 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 164 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -816,13 +820,13 @@ WriteLiteral(" class=\"assignedUser\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 165 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 167 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 165 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 167 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (device.Errors.TryGetValue("AssignedUserId", out error))
|
||||
{
|
||||
|
||||
@@ -836,7 +840,7 @@ WriteLiteral(" class=\"error\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 167 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 169 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(error);
|
||||
|
||||
|
||||
@@ -845,7 +849,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 168 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 170 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -864,7 +868,7 @@ WriteLiteral("<None>");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 176 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 178 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -873,14 +877,14 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 179 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 181 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(device.AssignedUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 179 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 181 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
}
|
||||
}
|
||||
@@ -897,7 +901,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Change</span>\r\n");
|
||||
|
||||
|
||||
#line 185 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 187 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -910,13 +914,13 @@ WriteLiteral(" class=\"location\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 188 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 190 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 188 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 190 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (device.Errors.TryGetValue("Location", out error))
|
||||
{
|
||||
|
||||
@@ -930,7 +934,7 @@ WriteLiteral(" class=\"error\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 190 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 192 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(error);
|
||||
|
||||
|
||||
@@ -939,7 +943,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 191 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 193 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -958,7 +962,7 @@ WriteLiteral("<None>");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 199 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 201 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -967,14 +971,14 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 202 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 204 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(device.Location);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 202 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 204 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
}
|
||||
}
|
||||
@@ -991,7 +995,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Change</span>\r\n");
|
||||
|
||||
|
||||
#line 208 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 210 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1004,13 +1008,13 @@ WriteLiteral(" class=\"assetNumber\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 211 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 213 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 211 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 213 "..\..\Views\Device\ImportReview.cshtml"
|
||||
if (device.Errors.TryGetValue("AssetNumber", out error))
|
||||
{
|
||||
|
||||
@@ -1024,7 +1028,7 @@ WriteLiteral(" class=\"error\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 213 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 215 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(error);
|
||||
|
||||
|
||||
@@ -1033,7 +1037,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 214 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 216 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1052,7 +1056,7 @@ WriteLiteral("<None>");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 222 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 224 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1061,14 +1065,14 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 225 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 227 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(device.AssetNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 225 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 227 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1085,7 +1089,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Change</span>\r\n");
|
||||
|
||||
|
||||
#line 231 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 233 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1094,7 +1098,7 @@ WriteLiteral(">No Change</span>\r\n");
|
||||
WriteLiteral("</td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 234 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 236 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -1103,7 +1107,7 @@ WriteLiteral("</td>\r\n </tr>\r\n");
|
||||
WriteLiteral(" </tbody>\r\n </table>\r\n");
|
||||
|
||||
|
||||
#line 237 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 239 "..\..\Views\Device\ImportReview.cshtml"
|
||||
|
||||
if (importDeviceOkCount > 0)
|
||||
{
|
||||
@@ -1120,7 +1124,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 241 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 243 "..\..\Views\Device\ImportReview.cshtml"
|
||||
Write(Html.ActionLinkButton(string.Format("Import {0} Device{1}", importDeviceOkCount, importDeviceOkCount != 1 ? "s" : null), MVC.API.Device.ImportProcess(Model.ImportParseTaskId)));
|
||||
|
||||
|
||||
@@ -1129,7 +1133,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 243 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 245 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1141,7 +1145,7 @@ WriteLiteral("\r\n </div>\r\n");
|
||||
WriteLiteral(" <h2>No Devices were found in this file</h2>\r\n");
|
||||
|
||||
|
||||
#line 248 "..\..\Views\Device\ImportReview.cshtml"
|
||||
#line 250 "..\..\Views\Device\ImportReview.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,25 @@
|
||||
@{
|
||||
ViewBag.Title = "Devices";
|
||||
}
|
||||
<h3>
|
||||
Search for a Device</h3>
|
||||
@Html.Partial(MVC.Shared.Views._SearchDialog, "devices")
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Import/Export Devices", MVC.Device.ImportExport())
|
||||
@Html.ActionLinkButton("Add Offline Device", MVC.Device.AddOffline())
|
||||
</div>
|
||||
@if (Authorization.Has(Claims.Device.Search))
|
||||
{
|
||||
<h3>Search for a Device</h3>
|
||||
@Html.Partial(MVC.Shared.Views._SearchDialog, "devices")
|
||||
}
|
||||
@if (Authorization.HasAny(Claims.Device.Actions.Import, Claims.Device.Actions.Export, Claims.Device.Actions.EnrolDevices))
|
||||
{
|
||||
<div class="actionBar">
|
||||
@if (Authorization.HasAll(Claims.Device.Actions.Import, Claims.Device.Actions.Export))
|
||||
{
|
||||
@Html.ActionLinkButton("Import/Export Devices", MVC.Device.ImportExport())
|
||||
}else if (Authorization.Has(Claims.Device.Actions.Import)){
|
||||
@Html.ActionLinkButton("Import Devices", MVC.Device.ImportExport())
|
||||
}else if (Authorization.Has(Claims.Device.Actions.Export)){
|
||||
@Html.ActionLinkButton("Export All Devices", MVC.API.Device.ExportAllDevices())
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.Actions.EnrolDevices))
|
||||
{
|
||||
@Html.ActionLinkButton("Add Offline Device", MVC.Device.AddOffline())
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Device
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Device/Index.cshtml")]
|
||||
public partial class Index : System.Web.Mvc.WebViewPage<dynamic>
|
||||
public partial class Index : Disco.Services.Web.WebViewPage<dynamic>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
@@ -48,43 +50,145 @@ namespace Disco.Web.Views.Device
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h3>\r\n Search for a Device</h3>\r\n");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\Device\Index.cshtml"
|
||||
#line 4 "..\..\Views\Device\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Search))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <h3>Search for a Device</h3>\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Device\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Device\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._SearchDialog, "devices"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
#line 7 "..\..\Views\Device\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Device\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Device.Actions.Import, Claims.Device.Actions.Export, Claims.Device.Actions.EnrolDevices))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"actionBar\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 8 "..\..\Views\Device\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Import/Export Devices", MVC.Device.ImportExport()));
|
||||
#line 12 "..\..\Views\Device\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Device\Index.cshtml"
|
||||
if (Authorization.HasAll(Claims.Device.Actions.Import, Claims.Device.Actions.Export))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\Device\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Import/Export Devices", MVC.Device.ImportExport()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Device\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Add Offline Device", MVC.Device.AddOffline()));
|
||||
#line 14 "..\..\Views\Device\Index.cshtml"
|
||||
|
||||
}else if (Authorization.Has(Claims.Device.Actions.Import)){
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 16 "..\..\Views\Device\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Import Devices", MVC.Device.ImportExport()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n");
|
||||
|
||||
#line 16 "..\..\Views\Device\Index.cshtml"
|
||||
|
||||
}else if (Authorization.Has(Claims.Device.Actions.Export)){
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 18 "..\..\Views\Device\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Export All Devices", MVC.API.Device.ExportAllDevices()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 18 "..\..\Views\Device\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Device\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Actions.EnrolDevices))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 22 "..\..\Views\Device\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Add Offline Device", MVC.Device.AddOffline()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 22 "..\..\Views\Device\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Device\Index.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,38 +17,57 @@
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $tabs = $('#DeviceDetailTabs');
|
||||
$tabs.tabs({
|
||||
activate: function (event, ui) {
|
||||
window.setTimeout(function () {
|
||||
var $window = $(window);
|
||||
var tabHeight = $tabs.height();
|
||||
var tabOffset = $tabs.offset();
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var windowHeight = $window.height();
|
||||
if ($tabs.children().length > 1) {
|
||||
$tabs.tabs({
|
||||
activate: function (event, ui) {
|
||||
window.setTimeout(function () {
|
||||
var $window = $(window);
|
||||
var tabHeight = $tabs.height();
|
||||
var tabOffset = $tabs.offset();
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var windowHeight = $window.height();
|
||||
|
||||
var tabTopNotShown = windowScrollTop - tabOffset.top;
|
||||
if (tabTopNotShown > 0) {
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
} else {
|
||||
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
|
||||
if (tabBottomNotShown > 0) {
|
||||
if (tabHeight > windowHeight)
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
else
|
||||
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
|
||||
var tabTopNotShown = windowScrollTop - tabOffset.top;
|
||||
if (tabTopNotShown > 0) {
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
} else {
|
||||
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
|
||||
if (tabBottomNotShown > 0) {
|
||||
if (tabHeight > windowHeight)
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
else
|
||||
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$tabs.hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div id="DeviceDetailTabs">
|
||||
<ul id="DeviceDetailTabItems"></ul>
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._Jobs, Model)
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._Details, Model)
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._AssignmentHistory, Model)
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model)
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._Certificates, Model)
|
||||
@if (Authorization.Has(Claims.Device.ShowJobs))
|
||||
{
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._Jobs, Model)
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.ShowDetails))
|
||||
{
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._Details, Model)
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.ShowAssignmentHistory))
|
||||
{
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._AssignmentHistory, Model)
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.ShowAttachments))
|
||||
{
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model)
|
||||
}
|
||||
@if (Authorization.Has(Claims.Device.ShowCertificates))
|
||||
{
|
||||
@Html.Partial(MVC.Device.Views.DeviceParts._Certificates, Model)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Device
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Device/Show.cshtml")]
|
||||
public partial class Show : System.Web.Mvc.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Models.Device.ShowModel>
|
||||
{
|
||||
public Show()
|
||||
{
|
||||
@@ -101,36 +103,27 @@ WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var $tabs = $('#DeviceDetailTabs');
|
||||
$tabs.tabs({
|
||||
activate: function (event, ui) {
|
||||
window.setTimeout(function () {
|
||||
var $window = $(window);
|
||||
var tabHeight = $tabs.height();
|
||||
var tabOffset = $tabs.offset();
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var windowHeight = $window.height();
|
||||
|
||||
var tabTopNotShown = windowScrollTop - tabOffset.top;
|
||||
if (tabTopNotShown > 0) {
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
} else {
|
||||
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
|
||||
if (tabBottomNotShown > 0) {
|
||||
if (tabHeight > windowHeight)
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
else
|
||||
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div");
|
||||
WriteLiteral(">\r\n $(function () {\r\n var $tabs = $(\'#DeviceDetailTabs\');\r\n " +
|
||||
" if ($tabs.children().length > 1) {\r\n $tabs.tabs({\r\n " +
|
||||
" activate: function (event, ui) {\r\n window.s" +
|
||||
"etTimeout(function () {\r\n var $window = $(window);\r\n " +
|
||||
" var tabHeight = $tabs.height();\r\n " +
|
||||
" var tabOffset = $tabs.offset();\r\n var windowS" +
|
||||
"crollTop = $window.scrollTop();\r\n var windowHeight = " +
|
||||
"$window.height();\r\n\r\n var tabTopNotShown = windowScro" +
|
||||
"llTop - tabOffset.top;\r\n if (tabTopNotShown > 0) {\r\n " +
|
||||
" $(\'html\').animate({ scrollTop: tabOffset.top }, 1" +
|
||||
"25);\r\n } else {\r\n var " +
|
||||
"tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.t" +
|
||||
"op)) * -1;\r\n if (tabBottomNotShown > 0) {\r\n " +
|
||||
" if (tabHeight > windowHeight)\r\n " +
|
||||
" $(\'html\').animate({ scrollTop: tabOffset.top }, 125);\r\n " +
|
||||
" else\r\n $(" +
|
||||
"\'html\').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);\r\n " +
|
||||
" }\r\n }\r\n " +
|
||||
" }, 1);\r\n }\r\n });\r\n } else {\r\n " +
|
||||
" $tabs.hide();\r\n }\r\n });\r\n </script>\r\n <di" +
|
||||
"v");
|
||||
|
||||
WriteLiteral(" id=\"DeviceDetailTabs\"");
|
||||
|
||||
@@ -140,60 +133,136 @@ WriteLiteral(" id=\"DeviceDetailTabItems\"");
|
||||
|
||||
WriteLiteral("></ul>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Jobs, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Details, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._AssignmentHistory, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Certificates, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowJobs))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Jobs, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n</div>\r\n");
|
||||
|
||||
#line 54 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowDetails))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 58 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Details, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 58 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowAssignmentHistory))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 62 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._AssignmentHistory, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 62 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 64 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowAttachments))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Resources, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\Device\Show.cshtml"
|
||||
if (Authorization.Has(Claims.Device.ShowCertificates))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 70 "..\..\Views\Device\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Device.Views.DeviceParts._Certificates, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 70 "..\..\Views\Device\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +1,26 @@
|
||||
@model IEnumerable<Disco.Models.BI.Search.DeviceSearchResultItem>
|
||||
@{
|
||||
var canShowDevices = Authorization.Has(Claims.Device.Show);
|
||||
}
|
||||
<div class="genericData deviceTable">
|
||||
@if (Model != null && Model.Count() > 0)
|
||||
{
|
||||
<table class="genericData deviceTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Serial#
|
||||
<th>Serial#
|
||||
</th>
|
||||
<th>
|
||||
Asset#
|
||||
<th>Asset#
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
<th>Name
|
||||
</th>
|
||||
<th>
|
||||
Model
|
||||
<th>Model
|
||||
</th>
|
||||
<th>
|
||||
Profile
|
||||
<th>Profile
|
||||
</th>
|
||||
<th>
|
||||
Assigned User
|
||||
<th>Assigned User
|
||||
</th>
|
||||
<th>
|
||||
Jobs
|
||||
<th>Jobs
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -33,7 +29,10 @@
|
||||
{
|
||||
<tr class="@(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty)">
|
||||
<td>
|
||||
@Html.ActionLink(item.SerialNumber, MVC.Device.Show(item.SerialNumber))
|
||||
@if (canShowDevices)
|
||||
{@Html.ActionLink(item.SerialNumber, MVC.Device.Show(item.SerialNumber))}
|
||||
else
|
||||
{@item.SerialNumber}
|
||||
</td>
|
||||
<td>
|
||||
@item.AssetNumber
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,32 +28,42 @@ namespace Disco.Web.Views.Device
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Device/_DeviceTable.cshtml")]
|
||||
public partial class DeviceTable : System.Web.Mvc.WebViewPage<IEnumerable<Disco.Models.BI.Search.DeviceSearchResultItem>>
|
||||
public partial class DeviceTable : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Models.BI.Search.DeviceSearchResultItem>>
|
||||
{
|
||||
public DeviceTable()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
#line 2 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
var canShowDevices = Authorization.Has(Claims.Device.Show);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"genericData deviceTable\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 3 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 6 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 3 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 6 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (Model != null && Model.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -67,26 +77,19 @@ WriteLiteral(" class=\"genericData deviceTable\"");
|
||||
WriteLiteral(@">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Serial#
|
||||
<th>Serial#
|
||||
</th>
|
||||
<th>
|
||||
Asset#
|
||||
<th>Asset#
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
<th>Name
|
||||
</th>
|
||||
<th>
|
||||
Model
|
||||
<th>Model
|
||||
</th>
|
||||
<th>
|
||||
Profile
|
||||
<th>Profile
|
||||
</th>
|
||||
<th>
|
||||
Assigned User
|
||||
<th>Assigned User
|
||||
</th>
|
||||
<th>
|
||||
Jobs
|
||||
<th>Jobs
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -94,13 +97,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 28 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 28 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
@@ -109,33 +112,66 @@ WriteLiteral(@">
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1005), Tuple.Create("\"", 1082)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 895), Tuple.Create("\"", 972)
|
||||
|
||||
#line 34 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1013), Tuple.Create<System.Object, System.Int32>(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty
|
||||
#line 30 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 903), Tuple.Create<System.Object, System.Int32>(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1013), false)
|
||||
, 903), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(Html.ActionLink(item.SerialNumber, MVC.Device.Show(item.SerialNumber)));
|
||||
#line 32 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 32 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (canShowDevices)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(Html.ActionLink(item.SerialNumber, MVC.Device.Show(item.SerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
#line 33 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 38 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.AssetNumber);
|
||||
|
||||
|
||||
@@ -144,13 +180,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 39 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 39 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (item.DecommissionedDate.HasValue)
|
||||
{
|
||||
|
||||
@@ -165,7 +201,7 @@ WriteLiteral(">(Decommissioned\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 41 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.DecommissionedDate.Value));
|
||||
|
||||
|
||||
@@ -174,7 +210,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(")</span> ");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 41 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -183,13 +219,13 @@ WriteLiteral(")</span> ");
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 44 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 45 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 44 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (string.IsNullOrWhiteSpace(item.ComputerName))
|
||||
{
|
||||
|
||||
@@ -203,7 +239,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 47 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -212,14 +248,14 @@ WriteLiteral(">Unknown</span>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 50 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.ComputerName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 50 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -229,13 +265,13 @@ WriteLiteral(">Unknown</span>\r\n");
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 54 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 55 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 54 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (item.DeviceModelDescription != null)
|
||||
{
|
||||
|
||||
@@ -245,7 +281,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 56 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.DeviceModelDescription);
|
||||
|
||||
|
||||
@@ -254,7 +290,7 @@ WriteLiteral(" <span>");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 57 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -269,7 +305,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">Unknown</span> \r\n");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 61 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +316,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 64 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.DeviceProfileDescription);
|
||||
|
||||
|
||||
@@ -289,13 +325,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 67 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 67 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
if (string.IsNullOrEmpty(item.AssignedUserId))
|
||||
{
|
||||
|
||||
@@ -309,7 +345,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">N/A</span> \r\n");
|
||||
|
||||
|
||||
#line 71 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 70 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -320,7 +356,7 @@ WriteLiteral(">N/A</span> \r\n");
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 74 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 73 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.AssignedUserDescription);
|
||||
|
||||
|
||||
@@ -329,7 +365,7 @@ WriteLiteral(" <span>");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 74 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -340,7 +376,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 77 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.JobCount);
|
||||
|
||||
|
||||
@@ -349,7 +385,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 81 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 80 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -358,7 +394,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n
|
||||
WriteLiteral(" </tbody>\r\n </table>\r\n");
|
||||
|
||||
|
||||
#line 84 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 83 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -373,7 +409,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Devices Found</span>\r\n");
|
||||
|
||||
|
||||
#line 88 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
#line 87 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,6 +28,8 @@ namespace Disco.Web.Views.Device
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.InitialConfig
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/InitialConfig/Complete.cshtml")]
|
||||
public partial class Complete : System.Web.Mvc.WebViewPage<Disco.Web.Models.InitialConfig.CompleteModel>
|
||||
public partial class Complete : Disco.Services.Web.WebViewPage<Disco.Web.Models.InitialConfig.CompleteModel>
|
||||
{
|
||||
public Complete()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.InitialConfig
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/InitialConfig/Database.cshtml")]
|
||||
public partial class Database : System.Web.Mvc.WebViewPage<Disco.Web.Models.InitialConfig.DatabaseModel>
|
||||
public partial class Database : Disco.Services.Web.WebViewPage<Disco.Web.Models.InitialConfig.DatabaseModel>
|
||||
{
|
||||
public Database()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.InitialConfig
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/InitialConfig/FileStore.cshtml")]
|
||||
public partial class FileStore : System.Web.Mvc.WebViewPage<Disco.Web.Models.InitialConfig.FileStoreModel>
|
||||
public partial class FileStore : Disco.Services.Web.WebViewPage<Disco.Web.Models.InitialConfig.FileStoreModel>
|
||||
{
|
||||
public FileStore()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.InitialConfig
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/InitialConfig/RestartWebApp.cshtml")]
|
||||
public partial class RestartWebApp : System.Web.Mvc.WebViewPage<dynamic>
|
||||
public partial class RestartWebApp : Disco.Services.Web.WebViewPage<dynamic>
|
||||
{
|
||||
public RestartWebApp()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.InitialConfig
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/InitialConfig/Welcome.cshtml")]
|
||||
public partial class Welcome : System.Web.Mvc.WebViewPage<Disco.Web.Models.InitialConfig.WelcomeModel>
|
||||
public partial class Welcome : Disco.Services.Web.WebViewPage<Disco.Web.Models.InitialConfig.WelcomeModel>
|
||||
{
|
||||
public Welcome()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.InitialConfig
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/InitialConfig/_Layout.cshtml")]
|
||||
public partial class Layout : System.Web.Mvc.WebViewPage<dynamic>
|
||||
public partial class Layout : Disco.Services.Web.WebViewPage<dynamic>
|
||||
{
|
||||
public Layout()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,6 +28,8 @@ namespace Disco.Web.Views.InitialConfig
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@model Disco.Web.Models.Job.CreateModel
|
||||
@{
|
||||
Authorization.Require(Claims.Job.Actions.Create);
|
||||
|
||||
Layout = "~/Views/Shared/_DialogLayout.cshtml";
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create");
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/Create.cshtml")]
|
||||
public partial class Create : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.CreateModel>
|
||||
public partial class Create : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.CreateModel>
|
||||
{
|
||||
public Create()
|
||||
{
|
||||
@@ -43,6 +45,8 @@ namespace Disco.Web.Views.Job
|
||||
|
||||
#line 2 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.Actions.Create);
|
||||
|
||||
Layout = "~/Views/Shared/_DialogLayout.cshtml";
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create");
|
||||
|
||||
@@ -56,13 +60,13 @@ WriteLiteral(" id=\"createJob_Container\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\Create.cshtml"
|
||||
#line 9 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\Create.cshtml"
|
||||
#line 9 "..\..\Views\Job\Create.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.Create(), FormMethod.Post))
|
||||
{
|
||||
|
||||
@@ -70,42 +74,42 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\Create.cshtml"
|
||||
#line 11 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.DeviceSerialNumber));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\Create.cshtml"
|
||||
#line 11 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Job\Create.cshtml"
|
||||
#line 12 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.UserId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Job\Create.cshtml"
|
||||
#line 12 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Job\Create.cshtml"
|
||||
#line 13 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.QuickLogDestinationUrl));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Job\Create.cshtml"
|
||||
#line 13 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -113,28 +117,28 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Views\Job\Create.cshtml"
|
||||
#line 15 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views._CreateSubject, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Views\Job\Create.cshtml"
|
||||
#line 15 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\Job\Create.cshtml"
|
||||
#line 16 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.ValidationSummary(true));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\Job\Create.cshtml"
|
||||
#line 16 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -154,7 +158,7 @@ WriteLiteral(">\r\n <h3>Type</h3>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Job\Create.cshtml"
|
||||
#line 21 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.Type));
|
||||
|
||||
|
||||
@@ -165,7 +169,7 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Job\Create.cshtml"
|
||||
#line 22 "..\..\Views\Job\Create.cshtml"
|
||||
Write(CommonHelpers.RadioButtonList("Type", Model.JobTypes.ToSelectListItems(Model.Type), 3));
|
||||
|
||||
|
||||
@@ -176,7 +180,7 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\Create.cshtml"
|
||||
#line 23 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.SubTypes));
|
||||
|
||||
|
||||
@@ -189,13 +193,13 @@ WriteLiteral(" id=\"createJob_SubTypes\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Job\Create.cshtml"
|
||||
#line 26 "..\..\Views\Job\Create.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 24 "..\..\Views\Job\Create.cshtml"
|
||||
#line 26 "..\..\Views\Job\Create.cshtml"
|
||||
foreach (var jt in Model.JobTypes)
|
||||
{
|
||||
|
||||
@@ -204,15 +208,15 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1037), Tuple.Create("\"", 1068)
|
||||
, Tuple.Create(Tuple.Create("", 1042), Tuple.Create("createJob_SubType_", 1042), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 1098), Tuple.Create("\"", 1129)
|
||||
, Tuple.Create(Tuple.Create("", 1103), Tuple.Create("createJob_SubType_", 1103), true)
|
||||
|
||||
#line 26 "..\..\Views\Job\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1060), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
#line 28 "..\..\Views\Job\Create.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1121), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1060), false)
|
||||
, 1121), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"createJob_SubType\"");
|
||||
@@ -226,7 +230,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Job\Create.cshtml"
|
||||
#line 30 "..\..\Views\Job\Create.cshtml"
|
||||
Write(CommonHelpers.CheckBoxList("SubTypes", Model.JobSubTypes.Where(jst => jst.JobTypeId == jt.Id).ToList().ToSelectListItems(Model.SubTypes), 3));
|
||||
|
||||
|
||||
@@ -235,7 +239,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n </div> \r\n");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\Create.cshtml"
|
||||
#line 33 "..\..\Views\Job\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -254,7 +258,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Job\Create.cshtml"
|
||||
#line 37 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.DeviceHeld));
|
||||
|
||||
|
||||
@@ -265,7 +269,7 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Job\Create.cshtml"
|
||||
#line 38 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.HiddenFor(m => m.DeviceHeld));
|
||||
|
||||
|
||||
@@ -318,7 +322,7 @@ WriteLiteral(">\r\n <table>\r\n <tr>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Job\Create.cshtml"
|
||||
#line 60 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.EditorFor(m => m.Comments));
|
||||
|
||||
|
||||
@@ -360,7 +364,7 @@ WriteLiteral(">\r\n <h3>Task Time</h3>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Job\Create.cshtml"
|
||||
#line 72 "..\..\Views\Job\Create.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.QuickLogTaskTimeMinutes));
|
||||
|
||||
|
||||
@@ -456,7 +460,7 @@ WriteLiteral(" />\r\n Minutes\r\n </span>\r\n
|
||||
" </div>\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Views\Job\Create.cshtml"
|
||||
#line 84 "..\..\Views\Job\Create.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@model Disco.Web.Models.Job.CreateRedirectModel
|
||||
@{
|
||||
Authorization.Require(Claims.Job.Actions.Create);
|
||||
|
||||
Layout = null;
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create - Redirecting...");
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/Create_Redirect.cshtml")]
|
||||
public partial class Create_Redirect : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.CreateRedirectModel>
|
||||
public partial class Create_Redirect : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.CreateRedirectModel>
|
||||
{
|
||||
public Create_Redirect()
|
||||
{
|
||||
@@ -43,6 +45,8 @@ namespace Disco.Web.Views.Job
|
||||
|
||||
#line 2 "..\..\Views\Job\Create_Redirect.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.Actions.Create);
|
||||
|
||||
Layout = null;
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), "Create - Redirecting...");
|
||||
|
||||
@@ -53,14 +57,14 @@ WriteLiteral("\r\n<a");
|
||||
|
||||
WriteLiteral(" id=\"redirectLink\"");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 188), Tuple.Create("\"", 214)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 249), Tuple.Create("\"", 275)
|
||||
|
||||
#line 6 "..\..\Views\Job\Create_Redirect.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 195), Tuple.Create<System.Object, System.Int32>(Model.RedirectLink
|
||||
#line 8 "..\..\Views\Job\Create_Redirect.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 256), Tuple.Create<System.Object, System.Int32>(Model.RedirectLink
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 195), false)
|
||||
, 256), false)
|
||||
);
|
||||
|
||||
WriteLiteral(@">Redirecting...</a>
|
||||
|
||||
+118
-111
@@ -1,129 +1,136 @@
|
||||
@model Disco.Web.Models.Job.IndexModel
|
||||
@{
|
||||
ViewBag.Title = "Jobs";
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Highcharts");
|
||||
|
||||
if (Authorization.Has(Claims.Job.ShowDailyChart))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Highcharts");
|
||||
}
|
||||
}
|
||||
<div class="clearfix columnHost">
|
||||
<div class="column50">
|
||||
<h2>Search Jobs</h2>
|
||||
@Html.Partial(MVC.Shared.Views._SearchDialog, "jobs")
|
||||
</div>
|
||||
<div class="column50">
|
||||
<h2>Daily Opened & Closed Jobs</h2>
|
||||
<div id="chartHostJobDailyOpenedClosed" style="height: 175px;">
|
||||
@if (Authorization.Has(Claims.Job.Search))
|
||||
{
|
||||
<div class="column50">
|
||||
<h2>Search Jobs</h2>
|
||||
@Html.Partial(MVC.Shared.Views._SearchDialog, "jobs")
|
||||
</div>
|
||||
@{
|
||||
var jsonData = new HtmlString(Json.Encode(Model.DailyOpenedClosedStatistics));
|
||||
}
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
var chartData;
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.ShowDailyChart))
|
||||
{
|
||||
<div class="column50">
|
||||
<h2>Daily Opened & Closed Jobs</h2>
|
||||
<div id="chartHostJobDailyOpenedClosed" style="height: 175px;">
|
||||
</div>
|
||||
@{
|
||||
var jsonData = new HtmlString(Json.Encode(Model.DailyOpenedClosedStatistics));
|
||||
}
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
var chartData;
|
||||
|
||||
function buildChart() {
|
||||
$(function () {
|
||||
function buildChart() {
|
||||
$(function () {
|
||||
|
||||
var data = chartData;
|
||||
var data = chartData;
|
||||
|
||||
var dataTotalOpenJobs = [];
|
||||
var dataOpenedJobs = [];
|
||||
var dataClosedJobs = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var dataItem = data[i];
|
||||
var dataItemDate = new Date(parseInt(dataItem.Timestamp.substr(6, dataItem.Timestamp.length - 8))).getTime(); // $.datepicker.parseDate('yy-mm-dd', dataItem.Timestamp.substr(0, 10)).getTime();
|
||||
dataTotalOpenJobs.push([dataItemDate, dataItem.TotalJobs]);
|
||||
dataOpenedJobs.push([dataItemDate, dataItem.OpenedJobs]);
|
||||
dataClosedJobs.push([dataItemDate, dataItem.ClosedJobs]);
|
||||
}
|
||||
Highcharts.setOptions({
|
||||
global: {
|
||||
useUTC: false
|
||||
var dataTotalOpenJobs = [];
|
||||
var dataOpenedJobs = [];
|
||||
var dataClosedJobs = [];
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var dataItem = data[i];
|
||||
var dataItemDate = new Date(parseInt(dataItem.Timestamp.substr(6, dataItem.Timestamp.length - 8))).getTime(); // $.datepicker.parseDate('yy-mm-dd', dataItem.Timestamp.substr(0, 10)).getTime();
|
||||
dataTotalOpenJobs.push([dataItemDate, dataItem.TotalJobs]);
|
||||
dataOpenedJobs.push([dataItemDate, dataItem.OpenedJobs]);
|
||||
dataClosedJobs.push([dataItemDate, dataItem.ClosedJobs]);
|
||||
}
|
||||
});
|
||||
new Highcharts.Chart({
|
||||
chart: {
|
||||
renderTo: 'chartHostJobDailyOpenedClosed',
|
||||
height: 175,
|
||||
animation: false
|
||||
},
|
||||
colors: ['#BBBBBB', '#005fab', '#DB761D'],
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
plotOptions: {
|
||||
series: {
|
||||
marker: {
|
||||
radius: 3
|
||||
},
|
||||
Highcharts.setOptions({
|
||||
global: {
|
||||
useUTC: false
|
||||
}
|
||||
});
|
||||
new Highcharts.Chart({
|
||||
chart: {
|
||||
renderTo: 'chartHostJobDailyOpenedClosed',
|
||||
height: 175,
|
||||
animation: false
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
align: 'left',
|
||||
verticalAlign: 'top',
|
||||
y: 0,
|
||||
floating: true,
|
||||
borderWidth: 0
|
||||
},
|
||||
xAxis: {
|
||||
type: 'datetime',
|
||||
tickInterval: 7 * 24 * 3600 * 1000, // week
|
||||
tickWidth: 1,
|
||||
gridLineWidth: 1,
|
||||
dateTimeLabelFormats: {
|
||||
week: '%e %b'
|
||||
}
|
||||
},
|
||||
yAxis: [{
|
||||
},
|
||||
colors: ['#BBBBBB', '#005fab', '#DB761D'],
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
labels: {
|
||||
plotOptions: {
|
||||
series: {
|
||||
marker: {
|
||||
radius: 3
|
||||
},
|
||||
animation: false
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
align: 'left',
|
||||
verticalAlign: 'top',
|
||||
y: 0,
|
||||
floating: true,
|
||||
borderWidth: 0
|
||||
},
|
||||
xAxis: {
|
||||
type: 'datetime',
|
||||
tickInterval: 7 * 24 * 3600 * 1000, // week
|
||||
tickWidth: 1,
|
||||
gridLineWidth: 1,
|
||||
dateTimeLabelFormats: {
|
||||
week: '%e %b'
|
||||
}
|
||||
},
|
||||
yAxis: [{
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
labels: {
|
||||
enabled: false
|
||||
},
|
||||
min: 0
|
||||
}, {
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
labels: {
|
||||
enabled: false
|
||||
},
|
||||
min: 0
|
||||
}],
|
||||
series: [{
|
||||
name: 'Total Open Jobs',
|
||||
data: dataTotalOpenJobs,
|
||||
yAxis: 1
|
||||
}, {
|
||||
name: 'Closed Jobs',
|
||||
data: dataClosedJobs
|
||||
}, {
|
||||
name: 'Opened Jobs',
|
||||
data: dataOpenedJobs
|
||||
}],
|
||||
credits: {
|
||||
enabled: false
|
||||
},
|
||||
min: 0
|
||||
}, {
|
||||
title: {
|
||||
text: null
|
||||
},
|
||||
labels: {
|
||||
enabled: false
|
||||
},
|
||||
min: 0
|
||||
}],
|
||||
series: [{
|
||||
name: 'Total Open Jobs',
|
||||
data: dataTotalOpenJobs,
|
||||
yAxis: 1
|
||||
}, {
|
||||
name: 'Closed Jobs',
|
||||
data: dataClosedJobs
|
||||
}, {
|
||||
name: 'Opened Jobs',
|
||||
data: dataOpenedJobs
|
||||
}],
|
||||
credits: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
chartData = $.parseJSON('@(jsonData)');
|
||||
buildChart();
|
||||
}());
|
||||
}
|
||||
chartData = $.parseJSON('@(jsonData)');
|
||||
buildChart();
|
||||
}());
|
||||
|
||||
</script>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<h2>Open Jobs Awaiting Technician Action (@Model.OpenJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.OpenJobs, new ViewDataDictionary())
|
||||
<h2>Long Running Jobs (@Model.LongRunningJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.LongRunningJobs, new ViewDataDictionary())
|
||||
@*<h2>
|
||||
Jobs with Devices Ready for Return (@Model.ReadyForReturnJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.ReadyForReturnJobs, new ViewDataDictionary())
|
||||
<h2>
|
||||
Jobs Waiting for User Action (@Model.WaitingForUserActionJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.WaitingForUserActionJobs, new ViewDataDictionary())
|
||||
<h2>
|
||||
Recently Closed Jobs (@Model.RecentlyClosedJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.RecentlyClosedJobs, new ViewDataDictionary())*@
|
||||
@if (Authorization.Has(Claims.Job.Lists.AwaitingTechnicianAction))
|
||||
{
|
||||
<h2>Open Jobs Awaiting Technician Action (@Model.OpenJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.OpenJobs, new ViewDataDictionary())
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Lists.LongRunningJobs))
|
||||
{
|
||||
<h2>Long Running Jobs (@Model.LongRunningJobs.Items.Count)</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.LongRunningJobs, new ViewDataDictionary())
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/Index.cshtml")]
|
||||
public partial class Index : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.IndexModel>
|
||||
public partial class Index : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.IndexModel>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
@@ -44,7 +46,11 @@ namespace Disco.Web.Views.Job
|
||||
#line 2 "..\..\Views\Job\Index.cshtml"
|
||||
|
||||
ViewBag.Title = "Jobs";
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Highcharts");
|
||||
|
||||
if (Authorization.Has(Claims.Job.ShowDailyChart))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Highcharts");
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -53,118 +59,176 @@ WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" class=\"clearfix columnHost\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"column50\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Search Jobs</h2>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._SearchDialog, "jobs"));
|
||||
#line 11 "..\..\Views\Job\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Job\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Search))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n <div");
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"column50\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Daily Opened & Closed Jobs</h2>\r\n <div");
|
||||
WriteLiteral(">\r\n <h2>Search Jobs</h2>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._SearchDialog, "jobs"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Job\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Job.ShowDailyChart))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"column50\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>Daily Opened & Closed Jobs</h2>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"chartHostJobDailyOpenedClosed\"");
|
||||
|
||||
WriteLiteral(" style=\"height: 175px;\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n");
|
||||
WriteLiteral(">\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Job\Index.cshtml"
|
||||
|
||||
#line 24 "..\..\Views\Job\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Job\Index.cshtml"
|
||||
|
||||
var jsonData = new HtmlString(Json.Encode(Model.DailyOpenedClosedStatistics));
|
||||
|
||||
#line 24 "..\..\Views\Job\Index.cshtml"
|
||||
|
||||
var jsonData = new HtmlString(Json.Encode(Model.DailyOpenedClosedStatistics));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n (function () {\r\n var chartData;\r\n\r\n " +
|
||||
"function buildChart() {\r\n $(function () {\r\n\r\n " +
|
||||
" var data = chartData;\r\n\r\n var dataTotalOpenJobs =" +
|
||||
" [];\r\n var dataOpenedJobs = [];\r\n " +
|
||||
"var dataClosedJobs = [];\r\n for (var i = 0; i < data.lengt" +
|
||||
"h; i++) {\r\n var dataItem = data[i];\r\n " +
|
||||
" var dataItemDate = new Date(parseInt(dataItem.Timestamp.substr(6, da" +
|
||||
"taItem.Timestamp.length - 8))).getTime(); // $.datepicker.parseDate(\'yy-mm-dd\', " +
|
||||
"dataItem.Timestamp.substr(0, 10)).getTime();\r\n dataTo" +
|
||||
"talOpenJobs.push([dataItemDate, dataItem.TotalJobs]);\r\n " +
|
||||
" dataOpenedJobs.push([dataItemDate, dataItem.OpenedJobs]);\r\n " +
|
||||
" dataClosedJobs.push([dataItemDate, dataItem.ClosedJobs]);\r\n " +
|
||||
" }\r\n Highcharts.setOptions({\r\n " +
|
||||
" global: {\r\n useUTC: false\r\n " +
|
||||
" }\r\n });\r\n new H" +
|
||||
"ighcharts.Chart({\r\n chart: {\r\n " +
|
||||
" renderTo: \'chartHostJobDailyOpenedClosed\',\r\n " +
|
||||
" height: 175,\r\n animation: false\r\n " +
|
||||
" },\r\n colors: [\'#BBBBBB\', \'#005fab\', " +
|
||||
"\'#DB761D\'],\r\n title: {\r\n " +
|
||||
" text: null\r\n },\r\n plotO" +
|
||||
"ptions: {\r\n series: {\r\n " +
|
||||
" marker: {\r\n radius: 3\r\n " +
|
||||
" },\r\n animation: f" +
|
||||
"alse\r\n }\r\n },\r\n " +
|
||||
" legend: {\r\n align: \'left\',\r\n" +
|
||||
" verticalAlign: \'top\',\r\n " +
|
||||
" y: 0,\r\n floating: true,\r\n " +
|
||||
" borderWidth: 0\r\n },\r\n " +
|
||||
" xAxis: {\r\n type: \'datetime\',\r\n " +
|
||||
" tickInterval: 7 * 24 * 3600 * 1000, // week\r\n " +
|
||||
" tickWidth: 1,\r\n gridLineWidt" +
|
||||
"h: 1,\r\n dateTimeLabelFormats: {\r\n " +
|
||||
" week: \'%e %b\'\r\n }\r\n " +
|
||||
" },\r\n yAxis: [{\r\n " +
|
||||
" title: {\r\n text: null\r\n " +
|
||||
" },\r\n labels: {\r\n " +
|
||||
" enabled: false\r\n },\r\n " +
|
||||
" min: 0\r\n }, {\r\n " +
|
||||
" title: {\r\n text: null" +
|
||||
"\r\n },\r\n labels: {\r" +
|
||||
"\n enabled: false\r\n " +
|
||||
" },\r\n min: 0\r\n }]," +
|
||||
"\r\n series: [{\r\n name: " +
|
||||
"\'Total Open Jobs\',\r\n data: dataTotalOpenJobs,\r\n " +
|
||||
" yAxis: 1\r\n }, {\r\n " +
|
||||
" name: \'Closed Jobs\',\r\n " +
|
||||
"data: dataClosedJobs\r\n }, {\r\n " +
|
||||
" name: \'Opened Jobs\',\r\n data: dataOpenedJo" +
|
||||
"bs\r\n }],\r\n credits: {\r\n " +
|
||||
" enabled: false\r\n }\r\n " +
|
||||
" });\r\n });\r\n }\r\n " +
|
||||
" chartData = $.parseJSON(\'");
|
||||
WriteLiteral(">\r\n (function () {\r\n var chartData;\r\n\r\n " +
|
||||
" function buildChart() {\r\n $(function () {\r\n\r\n" +
|
||||
" var data = chartData;\r\n\r\n " +
|
||||
" var dataTotalOpenJobs = [];\r\n var dataOpenedJobs = [" +
|
||||
"];\r\n var dataClosedJobs = [];\r\n " +
|
||||
" for (var i = 0; i < data.length; i++) {\r\n v" +
|
||||
"ar dataItem = data[i];\r\n var dataItemDate = new D" +
|
||||
"ate(parseInt(dataItem.Timestamp.substr(6, dataItem.Timestamp.length - 8))).getTi" +
|
||||
"me(); // $.datepicker.parseDate(\'yy-mm-dd\', dataItem.Timestamp.substr(0, 10)).ge" +
|
||||
"tTime();\r\n dataTotalOpenJobs.push([dataItemDate, " +
|
||||
"dataItem.TotalJobs]);\r\n dataOpenedJobs.push([data" +
|
||||
"ItemDate, dataItem.OpenedJobs]);\r\n dataClosedJobs" +
|
||||
".push([dataItemDate, dataItem.ClosedJobs]);\r\n }\r\n " +
|
||||
" Highcharts.setOptions({\r\n " +
|
||||
" global: {\r\n useUTC: false\r\n " +
|
||||
" }\r\n });\r\n n" +
|
||||
"ew Highcharts.Chart({\r\n chart: {\r\n " +
|
||||
" renderTo: \'chartHostJobDailyOpenedClosed\',\r\n " +
|
||||
" height: 175,\r\n animation" +
|
||||
": false\r\n },\r\n col" +
|
||||
"ors: [\'#BBBBBB\', \'#005fab\', \'#DB761D\'],\r\n title: " +
|
||||
"{\r\n text: null\r\n " +
|
||||
" },\r\n plotOptions: {\r\n " +
|
||||
" series: {\r\n marker: {\r\n " +
|
||||
" radius: 3\r\n " +
|
||||
" },\r\n animation: false\r\n " +
|
||||
" }\r\n },\r\n " +
|
||||
" legend: {\r\n align: \'left\',\r\n" +
|
||||
" verticalAlign: \'top\',\r\n " +
|
||||
" y: 0,\r\n floating: true,\r\n " +
|
||||
" borderWidth: 0\r\n }" +
|
||||
",\r\n xAxis: {\r\n " +
|
||||
" type: \'datetime\',\r\n tickInterval: 7 * 24 * 3" +
|
||||
"600 * 1000, // week\r\n tickWidth: 1,\r\n " +
|
||||
" gridLineWidth: 1,\r\n " +
|
||||
" dateTimeLabelFormats: {\r\n week: \'%e %b" +
|
||||
"\'\r\n }\r\n },\r\n " +
|
||||
" yAxis: [{\r\n tit" +
|
||||
"le: {\r\n text: null\r\n " +
|
||||
" },\r\n labels: {\r\n " +
|
||||
" enabled: false\r\n }," +
|
||||
"\r\n min: 0\r\n }," +
|
||||
" {\r\n title: {\r\n " +
|
||||
" text: null\r\n },\r\n " +
|
||||
" labels: {\r\n enabled: fa" +
|
||||
"lse\r\n },\r\n " +
|
||||
" min: 0\r\n }],\r\n se" +
|
||||
"ries: [{\r\n name: \'Total Open Jobs\',\r\n " +
|
||||
" data: dataTotalOpenJobs,\r\n " +
|
||||
" yAxis: 1\r\n }, {\r\n " +
|
||||
" name: \'Closed Jobs\',\r\n data: da" +
|
||||
"taClosedJobs\r\n }, {\r\n " +
|
||||
" name: \'Opened Jobs\',\r\n data: dataOpen" +
|
||||
"edJobs\r\n }],\r\n cre" +
|
||||
"dits: {\r\n enabled: false\r\n " +
|
||||
" }\r\n });\r\n });\r\n " +
|
||||
" }\r\n chartData = $.parseJSON(\'");
|
||||
|
||||
|
||||
#line 110 "..\..\Views\Job\Index.cshtml"
|
||||
Write(jsonData);
|
||||
#line 119 "..\..\Views\Job\Index.cshtml"
|
||||
Write(jsonData);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\');\r\n buildChart();\r\n }());\r\n\r\n </script>\r\n <" +
|
||||
"/div>\r\n</div>\r\n<h2>Open Jobs Awaiting Technician Action (");
|
||||
WriteLiteral("\');\r\n buildChart();\r\n }());\r\n\r\n </sc" +
|
||||
"ript>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 117 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Model.OpenJobs.Items.Count);
|
||||
#line 125 "..\..\Views\Job\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 127 "..\..\Views\Job\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.AwaitingTechnicianAction))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <h2>Open Jobs Awaiting Technician Action (");
|
||||
|
||||
|
||||
#line 129 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Model.OpenJobs.Items.Count);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -172,17 +236,39 @@ WriteLiteral("\');\r\n buildChart();\r\n }());\r\n\r\n
|
||||
WriteLiteral(")</h2>\r\n");
|
||||
|
||||
|
||||
#line 118 "..\..\Views\Job\Index.cshtml"
|
||||
#line 130 "..\..\Views\Job\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 130 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.OpenJobs, new ViewDataDictionary()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h2>Long Running Jobs (");
|
||||
|
||||
#line 130 "..\..\Views\Job\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line 119 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Model.LongRunningJobs.Items.Count);
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 132 "..\..\Views\Job\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.LongRunningJobs))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <h2>Long Running Jobs (");
|
||||
|
||||
|
||||
#line 134 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Model.LongRunningJobs.Items.Count);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -190,16 +276,25 @@ WriteLiteral("\r\n<h2>Long Running Jobs (");
|
||||
WriteLiteral(")</h2>\r\n");
|
||||
|
||||
|
||||
#line 120 "..\..\Views\Job\Index.cshtml"
|
||||
#line 135 "..\..\Views\Job\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 135 "..\..\Views\Job\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.LongRunningJobs, new ViewDataDictionary()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 135 "..\..\Views\Job\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,31 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-NumberFormatter");
|
||||
Authorization.Require(Claims.Job.ShowNonWarrantyComponents);
|
||||
|
||||
var hasEdit = Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.EditComponents);
|
||||
var hasAdd = Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.AddComponents);
|
||||
|
||||
if (hasEdit)
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-NumberFormatter");
|
||||
}
|
||||
}
|
||||
<table id="jobComponents">
|
||||
<tr>
|
||||
<th>
|
||||
Description
|
||||
<th>Description
|
||||
</th>
|
||||
<th>
|
||||
Cost
|
||||
</th>
|
||||
<th class="actions">
|
||||
|
||||
<th>Cost
|
||||
</th>
|
||||
@if (hasEdit)
|
||||
{
|
||||
<th class="actions">
|
||||
</th>
|
||||
}
|
||||
</tr>
|
||||
@foreach (var jc in Model.Job.JobComponents)
|
||||
@if (hasEdit)
|
||||
{
|
||||
foreach (var jc in Model.Job.JobComponents)
|
||||
{
|
||||
<tr data-jobcomponentid="@jc.Id">
|
||||
<td>
|
||||
<input type="text" class="description" value="@jc.Description" />
|
||||
@@ -27,161 +37,189 @@
|
||||
<span class="remove"></span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var jc in Model.Job.JobComponents)
|
||||
{
|
||||
<tr data-jobcomponentid="@jc.Id">
|
||||
<td>
|
||||
<span class="description">@jc.Description</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="cost">@jc.Cost.ToString("C")</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" id="jobComponentsAdd">Add Component</a>
|
||||
@if (hasEdit && hasAdd)
|
||||
{
|
||||
<a href="#" id="jobComponentsAdd">Add Component</a>
|
||||
}
|
||||
|
||||
</td>
|
||||
<td colspan="2" class="totalCost">
|
||||
Total: <span id="jobComponentsTotalCost"></span>
|
||||
<td colspan="@(hasEdit ? 2 : 1)" class="totalCost">Total: <span id="jobComponentsTotalCost">
|
||||
@if (!hasEdit)
|
||||
{
|
||||
@Model.Job.JobComponentsTotalCost().ToString("C")
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="dialogRemoveComponent" title="Remove this Component?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $jobComponents = $('#jobComponents');
|
||||
@if (hasEdit)
|
||||
{
|
||||
<div id="dialogRemoveComponent" title="Remove this Component?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $jobComponents = $('#jobComponents');
|
||||
|
||||
$jobComponents.on('change', 'input', updateComponent);
|
||||
$jobComponents.on('focus', 'input', function () { $(this).select() });
|
||||
$jobComponents.on('change', 'input', updateComponent);
|
||||
$jobComponents.on('focus', 'input', function () { $(this).select() });
|
||||
|
||||
|
||||
$jobComponents.on('click', 'span.remove', removeComponent);
|
||||
$jobComponents.on('click', 'span.remove', removeComponent);
|
||||
|
||||
$('#jobComponentsAdd').click(function () {
|
||||
var jc = $('<tr><td><input type="text" class="description" /></td><td><input type="text" class="cost" /></td><td><span class="remove"></span></td></tr>');
|
||||
jc.find('input').focus(function () { $(this).select() })
|
||||
jc.insertBefore($jobComponents.find('tr').last());
|
||||
jc.find('input.description').focus();
|
||||
return false;
|
||||
});
|
||||
$('#jobComponentsAdd').click(function () {
|
||||
var jc = $('<tr><td><input type="text" class="description" /></td><td><input type="text" class="cost" /></td><td><span class="remove"></span></td></tr>');
|
||||
jc.find('input').focus(function () { $(this).select() })
|
||||
jc.insertBefore($jobComponents.find('tr').last());
|
||||
jc.find('input.description').focus();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#dialogRemoveComponent').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
$('#dialogRemoveComponent').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
function removeComponent() {
|
||||
var componentRow = $(this).closest('tr');
|
||||
var id = componentRow.attr('data-jobcomponentid');
|
||||
if (id) {
|
||||
var data = { id: id };
|
||||
function removeComponent() {
|
||||
var componentRow = $(this).closest('tr');
|
||||
var id = componentRow.attr('data-jobcomponentid');
|
||||
if (id) {
|
||||
var data = { id: id };
|
||||
|
||||
var $dialogRemoveComponent = $('#dialogRemoveComponent');
|
||||
$dialogRemoveComponent.dialog("enable");
|
||||
$dialogRemoveComponent.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveComponent.dialog("disable");
|
||||
$dialogRemoveComponent.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.ComponentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
componentRow.remove();
|
||||
updateTotalCost();
|
||||
} else {
|
||||
alert('Unable to remove component: ' + d);
|
||||
var $dialogRemoveComponent = $('#dialogRemoveComponent');
|
||||
$dialogRemoveComponent.dialog("enable");
|
||||
$dialogRemoveComponent.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveComponent.dialog("disable");
|
||||
$dialogRemoveComponent.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.ComponentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
componentRow.remove();
|
||||
updateTotalCost();
|
||||
} else {
|
||||
alert('Unable to remove component: ' + d);
|
||||
}
|
||||
$dialogRemoveComponent.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove component: ' + textStatus);
|
||||
$dialogRemoveComponent.dialog("close");
|
||||
}
|
||||
$dialogRemoveComponent.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove component: ' + textStatus);
|
||||
$dialogRemoveComponent.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveComponent.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveComponent.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveComponent.dialog('open');
|
||||
|
||||
} else {
|
||||
// New - Remove
|
||||
componentRow.remove();
|
||||
updateTotalCost();
|
||||
}
|
||||
}
|
||||
function updateTotalCost() {
|
||||
var totalCost = 0;
|
||||
|
||||
$jobComponents.find('input.cost').each(function () {
|
||||
var v = $(this).val();
|
||||
v = $.parseNumber(v, { format: '#,##0.00', locale: 'au' });
|
||||
if (!isNaN(v))
|
||||
totalCost += v;
|
||||
});
|
||||
var totalCostFormatted = $.formatNumber(totalCost, { format: '#,##0.00', locale: 'au' });
|
||||
$('#jobComponentsTotalCost').text('$' + totalCostFormatted);
|
||||
}
|
||||
function updateComponent() {
|
||||
var componentRow = $(this).closest('tr');
|
||||
|
||||
$dialogRemoveComponent.dialog('open');
|
||||
componentRow.find('input').attr('disabled', true).addClass('updating');
|
||||
|
||||
} else {
|
||||
// New - Remove
|
||||
componentRow.remove();
|
||||
var id = componentRow.attr('data-jobcomponentid');
|
||||
if (id) {
|
||||
// Update
|
||||
var data = {
|
||||
id: id,
|
||||
Description: componentRow.find('input.description').val(),
|
||||
Cost: componentRow.find('input.cost').val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.ComponentUpdate())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to update component: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update component: ' + textStatus);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Add
|
||||
var data = {
|
||||
id: id,
|
||||
Description: componentRow.find('input.description').val(),
|
||||
Cost: componentRow.find('input.cost').val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.ComponentAdd(Model.Job.Id, null, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.attr('data-jobcomponentid', d.Component.Id);
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to add component: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add component: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
updateTotalCost();
|
||||
}
|
||||
}
|
||||
function updateTotalCost() {
|
||||
var totalCost = 0;
|
||||
|
||||
$jobComponents.find('input.cost').each(function () {
|
||||
var v = $(this).val();
|
||||
v = $.parseNumber(v, { format: '#,##0.00', locale: 'au' });
|
||||
if (!isNaN(v))
|
||||
totalCost += v;
|
||||
});
|
||||
var totalCostFormatted = $.formatNumber(totalCost, { format: '#,##0.00', locale: 'au' });
|
||||
$('#jobComponentsTotalCost').text('$' + totalCostFormatted);
|
||||
}
|
||||
function updateComponent() {
|
||||
var componentRow = $(this).closest('tr');
|
||||
|
||||
componentRow.find('input').attr('disabled', true).addClass('updating');
|
||||
|
||||
var id = componentRow.attr('data-jobcomponentid');
|
||||
if (id) {
|
||||
// Update
|
||||
var data = {
|
||||
id: id,
|
||||
Description: componentRow.find('input.description').val(),
|
||||
Cost: componentRow.find('input.cost').val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.ComponentUpdate())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to update component: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update component: ' + textStatus);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Add
|
||||
var data = {
|
||||
id: id,
|
||||
Description: componentRow.find('input.description').val(),
|
||||
Cost: componentRow.find('input.cost').val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.ComponentAdd(Model.Job.Id, null, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.attr('data-jobcomponentid', d.Component.Id);
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to add component: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add component: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
updateTotalCost();
|
||||
}
|
||||
updateTotalCost();
|
||||
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/JobParts/Components.cshtml")]
|
||||
public partial class Components : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
public partial class Components : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public Components()
|
||||
{
|
||||
@@ -43,8 +45,16 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
|
||||
#line 2 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-NumberFormatter");
|
||||
|
||||
Authorization.Require(Claims.Job.ShowNonWarrantyComponents);
|
||||
|
||||
var hasEdit = Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.EditComponents);
|
||||
var hasAdd = Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.AddComponents);
|
||||
|
||||
if (hasEdit)
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-NumberFormatter");
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -52,23 +62,50 @@ WriteLiteral("\r\n<table");
|
||||
|
||||
WriteLiteral(" id=\"jobComponents\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>\r\n Description\r\n </th>\r\n <th>\r\n" +
|
||||
" Cost\r\n </th>\r\n <th");
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>Description\r\n </th>\r\n <th>Cost\r\n </" +
|
||||
"th>\r\n");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 19 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
if (hasEdit)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"actions\"");
|
||||
|
||||
WriteLiteral(">\r\n \r\n </th>\r\n </tr>\r\n");
|
||||
WriteLiteral("> \r\n </th>\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 23 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 17 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
foreach (var jc in Model.Job.JobComponents)
|
||||
#line 25 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
if (hasEdit)
|
||||
{
|
||||
foreach (var jc in Model.Job.JobComponents)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -78,7 +115,7 @@ WriteLiteral(" <tr");
|
||||
WriteLiteral(" data-jobcomponentid=\"");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 29 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Id);
|
||||
|
||||
|
||||
@@ -92,14 +129,14 @@ WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" class=\"description\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 513), Tuple.Create("\"", 536)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 853), Tuple.Create("\"", 876)
|
||||
|
||||
#line 21 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 521), Tuple.Create<System.Object, System.Int32>(jc.Description
|
||||
#line 31 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 861), Tuple.Create<System.Object, System.Int32>(jc.Description
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 521), false)
|
||||
, 861), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </td>\r\n <td>\r\n <input");
|
||||
@@ -108,14 +145,14 @@ WriteLiteral(" type=\"text\"");
|
||||
|
||||
WriteLiteral(" class=\"cost\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 626), Tuple.Create("\"", 656)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 966), Tuple.Create("\"", 996)
|
||||
|
||||
#line 24 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 634), Tuple.Create<System.Object, System.Int32>(jc.Cost.ToString("C")
|
||||
#line 34 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 974), Tuple.Create<System.Object, System.Int32>(jc.Cost.ToString("C")
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 634), false)
|
||||
, 974), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </td>\r\n <td>\r\n <span");
|
||||
@@ -125,170 +162,310 @@ WriteLiteral(" class=\"remove\"");
|
||||
WriteLiteral("></span>\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
#line 40 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var jc in Model.Job.JobComponents)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteLiteral(" data-jobcomponentid=\"");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <td>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"description\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </td>\r\n <td>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"cost\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(jc.Cost.ToString("C"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n <a");
|
||||
WriteLiteral("\r\n <tr>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 59 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
if (hasEdit && hasAdd)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" id=\"jobComponentsAdd\"");
|
||||
|
||||
WriteLiteral(">Add Component</a>\r\n </td>\r\n <td");
|
||||
WriteLiteral(">Add Component</a>\r\n");
|
||||
|
||||
WriteLiteral(" colspan=\"2\"");
|
||||
|
||||
#line 62 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" \r\n </td>\r\n <td");
|
||||
|
||||
WriteAttribute("colspan", Tuple.Create(" colspan=\"", 1708), Tuple.Create("\"", 1736)
|
||||
|
||||
#line 65 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1718), Tuple.Create<System.Object, System.Int32>(hasEdit ? 2 : 1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1718), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"totalCost\"");
|
||||
|
||||
WriteLiteral(">\r\n Total: <span");
|
||||
WriteLiteral(">Total: <span");
|
||||
|
||||
WriteLiteral(" id=\"jobComponentsTotalCost\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </td>\r\n </tr>\r\n</table>\r\n<div");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 66 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
if (!hasEdit)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Model.Job.JobComponentsTotalCost().ToString("C"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </span>\r\n </td>\r\n </tr>\r\n</table>\r\n");
|
||||
|
||||
|
||||
#line 74 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
if (hasEdit)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogRemoveComponent\"");
|
||||
|
||||
WriteLiteral(" title=\"Remove this Component?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n Are you sure?</p>\r\n</div>\r\n<script");
|
||||
WriteLiteral("></span>\r\n Are you sure?\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n var $jobComponents = $(\'#jobComponents\');\r\n\r\n " +
|
||||
" $jobComponents.on(\'change\', \'input\', updateComponent);\r\n $jobComponen" +
|
||||
"ts.on(\'focus\', \'input\', function () { $(this).select() });\r\n\r\n\r\n $jobComp" +
|
||||
"onents.on(\'click\', \'span.remove\', removeComponent);\r\n\r\n $(\'#jobComponents" +
|
||||
"Add\').click(function () {\r\n var jc = $(\'<tr><td><input type=\"text\" cl" +
|
||||
"ass=\"description\" /></td><td><input type=\"text\" class=\"cost\" /></td><td><span cl" +
|
||||
"ass=\"remove\"></span></td></tr>\');\r\n jc.find(\'input\').focus(function (" +
|
||||
") { $(this).select() })\r\n jc.insertBefore($jobComponents.find(\'tr\').l" +
|
||||
"ast());\r\n jc.find(\'input.description\').focus();\r\n return f" +
|
||||
"alse;\r\n });\r\n\r\n $(\'#dialogRemoveComponent\').dialog({\r\n " +
|
||||
"resizable: false,\r\n height: 140,\r\n modal: true,\r\n " +
|
||||
" autoOpen: false\r\n });\r\n\r\n function removeComponent() {\r\n " +
|
||||
" var componentRow = $(this).closest(\'tr\');\r\n var id = componentRo" +
|
||||
"w.attr(\'data-jobcomponentid\');\r\n if (id) {\r\n var data " +
|
||||
"= { id: id };\r\n\r\n var $dialogRemoveComponent = $(\'#dialogRemoveCo" +
|
||||
"mponent\');\r\n $dialogRemoveComponent.dialog(\"enable\");\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\'option\', \'buttons\', {\r\n " +
|
||||
"\"Remove\": function () {\r\n $dialogRemoveComponent.dialog(\"" +
|
||||
"disable\");\r\n $dialogRemoveComponent.dialog(\"option\", \"but" +
|
||||
"tons\", null);\r\n $.ajax({\r\n url" +
|
||||
": \'");
|
||||
WriteLiteral(">\r\n $(function () {\r\n var $jobComponents = $(\'#jobComponents\');" +
|
||||
"\r\n\r\n $jobComponents.on(\'change\', \'input\', updateComponent);\r\n " +
|
||||
" $jobComponents.on(\'focus\', \'input\', function () { $(this).select() });\r\n\r\n\r\n" +
|
||||
" $jobComponents.on(\'click\', \'span.remove\', removeComponent);\r\n\r\n " +
|
||||
" $(\'#jobComponentsAdd\').click(function () {\r\n var jc = $(\'<" +
|
||||
"tr><td><input type=\"text\" class=\"description\" /></td><td><input type=\"text\" clas" +
|
||||
"s=\"cost\" /></td><td><span class=\"remove\"></span></td></tr>\');\r\n j" +
|
||||
"c.find(\'input\').focus(function () { $(this).select() })\r\n jc.inse" +
|
||||
"rtBefore($jobComponents.find(\'tr\').last());\r\n jc.find(\'input.desc" +
|
||||
"ription\').focus();\r\n return false;\r\n });\r\n\r\n " +
|
||||
" $(\'#dialogRemoveComponent\').dialog({\r\n resizable: false,\r\n " +
|
||||
" height: 140,\r\n modal: true,\r\n autoOpen:" +
|
||||
" false\r\n });\r\n\r\n function removeComponent() {\r\n " +
|
||||
" var componentRow = $(this).closest(\'tr\');\r\n var id = compone" +
|
||||
"ntRow.attr(\'data-jobcomponentid\');\r\n if (id) {\r\n " +
|
||||
" var data = { id: id };\r\n\r\n var $dialogRemoveComponent = $(" +
|
||||
"\'#dialogRemoveComponent\');\r\n $dialogRemoveComponent.dialog(\"e" +
|
||||
"nable\");\r\n $dialogRemoveComponent.dialog(\'option\', \'buttons\'," +
|
||||
" {\r\n \"Remove\": function () {\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\"disable\");\r\n $dialogR" +
|
||||
"emoveComponent.dialog(\"option\", \"buttons\", null);\r\n $" +
|
||||
".ajax({\r\n url: \'");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentRemove()));
|
||||
#line 120 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n da" +
|
||||
"ta: data,\r\n success: function (d) {\r\n " +
|
||||
" if (d == \'OK\') {\r\n componentR" +
|
||||
"ow.remove();\r\n updateTotalCost();\r\n " +
|
||||
" } else {\r\n alert(\'Unabl" +
|
||||
"e to remove component: \' + d);\r\n }\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\"close\");\r\n " +
|
||||
" },\r\n error: function (jqXHR, textStatus, erro" +
|
||||
"rThrown) {\r\n alert(\'Unable to remove component: \'" +
|
||||
" + textStatus);\r\n $dialogRemoveComponent.dialog(\"" +
|
||||
"close\");\r\n }\r\n });\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\"close\");\r\n }\r\n " +
|
||||
" });\r\n\r\n $dialogRemoveComponent.dialog(\'open\');\r\n\r\n } " +
|
||||
"else {\r\n // New - Remove\r\n componentRow.remove();\r" +
|
||||
"\n updateTotalCost();\r\n }\r\n }\r\n function " +
|
||||
"updateTotalCost() {\r\n var totalCost = 0;\r\n\r\n $jobComponent" +
|
||||
"s.find(\'input.cost\').each(function () {\r\n var v = $(this).val();\r" +
|
||||
"\n v = $.parseNumber(v, { format: \'#,##0.00\', locale: \'au\' });\r\n " +
|
||||
" if (!isNaN(v))\r\n totalCost += v;\r\n }" +
|
||||
");\r\n var totalCostFormatted = $.formatNumber(totalCost, { format: \'#," +
|
||||
"##0.00\', locale: \'au\' });\r\n $(\'#jobComponentsTotalCost\').text(\'$\' + t" +
|
||||
"otalCostFormatted);\r\n }\r\n function updateComponent() {\r\n " +
|
||||
" var componentRow = $(this).closest(\'tr\');\r\n\r\n componentRow.find(\'in" +
|
||||
"put\').attr(\'disabled\', true).addClass(\'updating\');\r\n\r\n var id = compo" +
|
||||
"nentRow.attr(\'data-jobcomponentid\');\r\n if (id) {\r\n // " +
|
||||
"Update\r\n var data = {\r\n id: id,\r\n " +
|
||||
" Description: componentRow.find(\'input.description\').val(),\r\n " +
|
||||
" Cost: componentRow.find(\'input.cost\').val()\r\n };\r\n " +
|
||||
" $.ajax({\r\n url: \'");
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n success: function (d) {\r\n " +
|
||||
" if (d == \'OK\') {\r\n " +
|
||||
" componentRow.remove();\r\n update" +
|
||||
"TotalCost();\r\n } else {\r\n " +
|
||||
" alert(\'Unable to remove component: \' + d);\r\n " +
|
||||
" }\r\n $dialogRemoveComponen" +
|
||||
"t.dialog(\"close\");\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to remove component: \' + textStatus);\r\n " +
|
||||
" $dialogRemoveComponent.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n }," +
|
||||
"\r\n Cancel: function () {\r\n $di" +
|
||||
"alogRemoveComponent.dialog(\"close\");\r\n }\r\n " +
|
||||
" });\r\n\r\n $dialogRemoveComponent.dialog(\'open\');\r\n\r\n " +
|
||||
" } else {\r\n // New - Remove\r\n com" +
|
||||
"ponentRow.remove();\r\n updateTotalCost();\r\n }\r\n" +
|
||||
" }\r\n function updateTotalCost() {\r\n var tot" +
|
||||
"alCost = 0;\r\n\r\n $jobComponents.find(\'input.cost\').each(function (" +
|
||||
") {\r\n var v = $(this).val();\r\n v = $.parse" +
|
||||
"Number(v, { format: \'#,##0.00\', locale: \'au\' });\r\n if (!isNaN" +
|
||||
"(v))\r\n totalCost += v;\r\n });\r\n " +
|
||||
" var totalCostFormatted = $.formatNumber(totalCost, { format: \'#,##0.00\', loc" +
|
||||
"ale: \'au\' });\r\n $(\'#jobComponentsTotalCost\').text(\'$\' + totalCost" +
|
||||
"Formatted);\r\n }\r\n function updateComponent() {\r\n " +
|
||||
" var componentRow = $(this).closest(\'tr\');\r\n\r\n componentRow." +
|
||||
"find(\'input\').attr(\'disabled\', true).addClass(\'updating\');\r\n\r\n va" +
|
||||
"r id = componentRow.attr(\'data-jobcomponentid\');\r\n if (id) {\r\n " +
|
||||
" // Update\r\n var data = {\r\n " +
|
||||
" id: id,\r\n Description: componentRow.find(\'input.des" +
|
||||
"cription\').val(),\r\n Cost: componentRow.find(\'input.cost\')" +
|
||||
".val()\r\n };\r\n $.ajax({\r\n " +
|
||||
" url: \'");
|
||||
|
||||
|
||||
#line 140 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentUpdate()));
|
||||
#line 177 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentUpdate()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to update component: ' + d.Result);
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to update component: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update component: ' + textStatus);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update component: ' + textStatus);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Add
|
||||
var data = {
|
||||
id: id,
|
||||
Description: componentRow.find('input.description').val(),
|
||||
Cost: componentRow.find('input.cost').val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '");
|
||||
});
|
||||
} else {
|
||||
// Add
|
||||
var data = {
|
||||
id: id,
|
||||
Description: componentRow.find('input.description').val(),
|
||||
Cost: componentRow.find('input.cost').val()
|
||||
};
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 164 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentAdd(Model.Job.Id, null, null)));
|
||||
#line 201 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.ComponentAdd(Model.Job.Id, null, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.attr('data-jobcomponentid', d.Component.Id);
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to add component: ' + d.Result);
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
componentRow.find('input').attr('disabled', false).removeClass('updating');
|
||||
if (d.Result == 'OK') {
|
||||
componentRow.attr('data-jobcomponentid', d.Component.Id);
|
||||
componentRow.find('input.description').val(d.Component.Description);
|
||||
componentRow.find('input.cost').val(d.Component.Cost);
|
||||
} else {
|
||||
alert('Unable to add component: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add component: ' + textStatus);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add component: ' + textStatus);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
updateTotalCost();
|
||||
}
|
||||
updateTotalCost();
|
||||
}
|
||||
updateTotalCost();
|
||||
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 225 "..\..\Views\Job\JobParts\Components.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.Job.ShowFlags);
|
||||
|
||||
var validFlags = Model.Job.ValidFlagsGrouped();
|
||||
var canEdit = Authorization.Has(Claims.Job.Properties.Flags);
|
||||
}
|
||||
<div id="jobDetailTab-Flags" class="jobPart">
|
||||
<table id="jobFlags">
|
||||
@@ -15,45 +18,47 @@
|
||||
@foreach (var flagItem in flagGroup.Value)
|
||||
{
|
||||
<div>
|
||||
<input type="checkbox" value="@flagItem.Item1" id="jobFlag_@(flagItem.Item1)" @(flagItem.Item3 ? new HtmlString("checked=\"checked\"") : new HtmlString(string.Empty)) /><label id="jobFlagLabel_@(flagItem.Item1)" for="jobFlag_@(flagItem.Item1)">@flagItem.Item2</label></div>
|
||||
<input type="checkbox" value="@flagItem.Item1" id="jobFlag_@(flagItem.Item1)" @(flagItem.Item3 ? new HtmlString("checked=\"checked\"") : new HtmlString(string.Empty)) @(canEdit ? new HtmlString(string.Empty) : new HtmlString("disabled=\"disabled\"")) /><label id="jobFlagLabel_@(flagItem.Item1)" for="jobFlag_@(flagItem.Item1)">@flagItem.Item2</label>
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<div id="dialogFlagsAction" title="Add Flag">
|
||||
@using (Html.BeginForm(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, true)))
|
||||
{
|
||||
<input id="dialogFlagsActionFlag" type="hidden" name="Flag" value="0" />
|
||||
<h3>
|
||||
Reason:</h3>
|
||||
<p>
|
||||
<textarea name="Reason" class="block"></textarea>
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#jobDetailTabItems').append('<li><a href="#jobDetailTab-Flags">Flags</a></li>');
|
||||
$(function () {
|
||||
var $flagCheckboxes = $('#jobFlags').find('input[type="checkbox"]');
|
||||
var $dialogFlagsAction = $('#dialogFlagsAction');
|
||||
var $flagCheckbox;
|
||||
@if (canEdit)
|
||||
{
|
||||
<div id="dialogFlagsAction" title="Add Flag">
|
||||
@using (Html.BeginForm(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, true)))
|
||||
{
|
||||
<input id="dialogFlagsActionFlag" type="hidden" name="Flag" value="0" />
|
||||
<h3>Reason:</h3>
|
||||
<p>
|
||||
<textarea name="Reason" class="block"></textarea>
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#jobDetailTabItems').append('<li><a href="#jobDetailTab-Flags">Flags</a></li>');
|
||||
$(function () {
|
||||
var $flagCheckboxes = $('#jobFlags').find('input[type="checkbox"]');
|
||||
var $dialogFlagsAction = $('#dialogFlagsAction');
|
||||
var $flagCheckbox;
|
||||
|
||||
var updateFlags = function () {
|
||||
$flagCheckbox = $(this);
|
||||
var flagValue = $flagCheckbox.val();
|
||||
var updateFlags = function () {
|
||||
$flagCheckbox = $(this);
|
||||
var flagValue = $flagCheckbox.val();
|
||||
|
||||
if ($flagCheckbox.is(':checked')) {
|
||||
// Add
|
||||
$('#dialogFlagsActionFlag').val(flagValue);
|
||||
var title = 'Add Flag: ' + $flagCheckbox.closest('tr').find('th .flagGroupName').text() + ': ' + $('#jobFlagLabel_' + flagValue).text();
|
||||
$dialogFlagsAction.dialog('option', 'title', title);
|
||||
$dialogFlagsAction.dialog('open');
|
||||
} else {
|
||||
// Remove
|
||||
var $ajaxLoading = $flagCheckbox.closest('tr').find('span.ajaxLoading');
|
||||
$ajaxLoading.show();
|
||||
$.getJSON('@(Url.Action(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, false)))', { Flag: '-' + flagValue }, function (response, result) {
|
||||
if ($flagCheckbox.is(':checked')) {
|
||||
// Add
|
||||
$('#dialogFlagsActionFlag').val(flagValue);
|
||||
var title = 'Add Flag: ' + $flagCheckbox.closest('tr').find('th .flagGroupName').text() + ': ' + $('#jobFlagLabel_' + flagValue).text();
|
||||
$dialogFlagsAction.dialog('option', 'title', title);
|
||||
$dialogFlagsAction.dialog('open');
|
||||
} else {
|
||||
// Remove
|
||||
var $ajaxLoading = $flagCheckbox.closest('tr').find('span.ajaxLoading');
|
||||
$ajaxLoading.show();
|
||||
$.getJSON('@(Url.Action(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, false)))', { Flag: '-' + flagValue }, function (response, result) {
|
||||
if (result != 'success' || response != 'OK') {
|
||||
alert('Unable to change Flag:\n' + response);
|
||||
$ajaxLoading.hide();
|
||||
@@ -86,5 +91,11 @@
|
||||
|
||||
$flagCheckboxes.click(updateFlags);
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
}else
|
||||
{
|
||||
<script>
|
||||
$('#jobDetailTabItems').append('<li><a href="#jobDetailTab-Flags">Flags</a></li>');
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/JobParts/Flags.cshtml")]
|
||||
public partial class Flags : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
public partial class Flags : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public Flags()
|
||||
{
|
||||
@@ -43,7 +45,10 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
|
||||
#line 2 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.ShowFlags);
|
||||
|
||||
var validFlags = Model.Job.ValidFlagsGrouped();
|
||||
var canEdit = Authorization.Has(Claims.Job.Properties.Flags);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -61,13 +66,13 @@ WriteLiteral(" id=\"jobFlags\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 10 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 10 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
foreach (var flagGroup in validFlags)
|
||||
{
|
||||
|
||||
@@ -81,7 +86,7 @@ WriteLiteral(" class=\"flagGroupName\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 11 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 14 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(flagGroup.Key);
|
||||
|
||||
|
||||
@@ -92,7 +97,7 @@ WriteLiteral("</span><br />\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 15 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
@@ -101,13 +106,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
foreach (var flagItem in flagGroup.Value)
|
||||
{
|
||||
|
||||
@@ -118,73 +123,82 @@ WriteLiteral(" <div>\r\n <inpu
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 609), Tuple.Create("\"", 632)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 728), Tuple.Create("\"", 751)
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 617), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
#line 21 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 736), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 617), false)
|
||||
, 736), false)
|
||||
);
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 633), Tuple.Create("\"", 663)
|
||||
, Tuple.Create(Tuple.Create("", 638), Tuple.Create("jobFlag_", 638), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 752), Tuple.Create("\"", 782)
|
||||
, Tuple.Create(Tuple.Create("", 757), Tuple.Create("jobFlag_", 757), true)
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 646), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
#line 21 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 765), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 646), false)
|
||||
, 765), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 21 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(flagItem.Item3 ? new HtmlString("checked=\"checked\"") : new HtmlString(string.Empty));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(canEdit ? new HtmlString(string.Empty) : new HtmlString("disabled=\"disabled\""));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 762), Tuple.Create("\"", 797)
|
||||
, Tuple.Create(Tuple.Create("", 767), Tuple.Create("jobFlagLabel_", 767), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 965), Tuple.Create("\"", 1000)
|
||||
, Tuple.Create(Tuple.Create("", 970), Tuple.Create("jobFlagLabel_", 970), true)
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 780), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
#line 21 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 983), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 780), false)
|
||||
, 983), false)
|
||||
);
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 798), Tuple.Create("\"", 829)
|
||||
, Tuple.Create(Tuple.Create("", 804), Tuple.Create("jobFlag_", 804), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 1001), Tuple.Create("\"", 1032)
|
||||
, Tuple.Create(Tuple.Create("", 1007), Tuple.Create("jobFlag_", 1007), true)
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 812), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
#line 21 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1015), Tuple.Create<System.Object, System.Int32>(flagItem.Item1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 812), false)
|
||||
, 1015), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(flagItem.Item2);
|
||||
#line 21 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(flagItem.Item2);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</label></div>\r\n");
|
||||
WriteLiteral("</label>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 23 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -193,13 +207,29 @@ WriteLiteral("</label></div>\r\n");
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
#line 26 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n <div");
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 28 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
if (canEdit)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogFlagsAction\"");
|
||||
|
||||
@@ -208,20 +238,20 @@ WriteLiteral(" title=\"Add Flag\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
|
||||
#line 31 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 25 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, true)))
|
||||
{
|
||||
#line 31 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
using (Html.BeginForm(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, true)))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <input");
|
||||
WriteLiteral(" <input");
|
||||
|
||||
WriteLiteral(" id=\"dialogFlagsActionFlag\"");
|
||||
|
||||
@@ -233,53 +263,55 @@ WriteLiteral(" value=\"0\"");
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
WriteLiteral(" <h3>\r\n Reason:</h3>\r\n");
|
||||
WriteLiteral(" <h3>Reason:</h3>\r\n");
|
||||
|
||||
WriteLiteral(" <p>\r\n <textarea");
|
||||
WriteLiteral(" <p>\r\n <textarea");
|
||||
|
||||
WriteLiteral(" name=\"Reason\"");
|
||||
|
||||
WriteLiteral(" class=\"block\"");
|
||||
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
WriteLiteral("></textarea>\r\n </p>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}
|
||||
#line 38 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <script");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$('#jobDetailTabItems').append('<li><a href=""#jobDetailTab-Flags"">Flags</a></li>');
|
||||
$(function () {
|
||||
var $flagCheckboxes = $('#jobFlags').find('input[type=""checkbox""]');
|
||||
var $dialogFlagsAction = $('#dialogFlagsAction');
|
||||
var $flagCheckbox;
|
||||
$('#jobDetailTabItems').append('<li><a href=""#jobDetailTab-Flags"">Flags</a></li>');
|
||||
$(function () {
|
||||
var $flagCheckboxes = $('#jobFlags').find('input[type=""checkbox""]');
|
||||
var $dialogFlagsAction = $('#dialogFlagsAction');
|
||||
var $flagCheckbox;
|
||||
|
||||
var updateFlags = function () {
|
||||
$flagCheckbox = $(this);
|
||||
var flagValue = $flagCheckbox.val();
|
||||
var updateFlags = function () {
|
||||
$flagCheckbox = $(this);
|
||||
var flagValue = $flagCheckbox.val();
|
||||
|
||||
if ($flagCheckbox.is(':checked')) {
|
||||
// Add
|
||||
$('#dialogFlagsActionFlag').val(flagValue);
|
||||
var title = 'Add Flag: ' + $flagCheckbox.closest('tr').find('th .flagGroupName').text() + ': ' + $('#jobFlagLabel_' + flagValue).text();
|
||||
$dialogFlagsAction.dialog('option', 'title', title);
|
||||
$dialogFlagsAction.dialog('open');
|
||||
} else {
|
||||
// Remove
|
||||
var $ajaxLoading = $flagCheckbox.closest('tr').find('span.ajaxLoading');
|
||||
$ajaxLoading.show();
|
||||
$.getJSON('");
|
||||
if ($flagCheckbox.is(':checked')) {
|
||||
// Add
|
||||
$('#dialogFlagsActionFlag').val(flagValue);
|
||||
var title = 'Add Flag: ' + $flagCheckbox.closest('tr').find('th .flagGroupName').text() + ': ' + $('#jobFlagLabel_' + flagValue).text();
|
||||
$dialogFlagsAction.dialog('option', 'title', title);
|
||||
$dialogFlagsAction.dialog('open');
|
||||
} else {
|
||||
// Remove
|
||||
var $ajaxLoading = $flagCheckbox.closest('tr').find('span.ajaxLoading');
|
||||
$ajaxLoading.show();
|
||||
$.getJSON('");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, false)));
|
||||
#line 61 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateFlag(Model.Job.Id, null, null, false)));
|
||||
|
||||
|
||||
#line default
|
||||
@@ -317,10 +349,29 @@ WriteLiteral(@"', { Flag: '-' + flagValue }, function (response, result) {
|
||||
|
||||
$flagCheckboxes.click(updateFlags);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script>\r\n $(\'#jobDetailTabItems\').append(\'<li><a href=\"#jobDe" +
|
||||
"tailTab-Flags\">Flags</a></li>\');\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 100 "..\..\Views\Job\JobParts\Flags.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.Job.ShowNonWarrantyInsurance);
|
||||
}
|
||||
<table id="jobNonWarrantyInsurance">
|
||||
@if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim)
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
{
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.InsuranceDetails))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
<tr>
|
||||
<th style="width: 230px;">
|
||||
Date of Loss or Damage
|
||||
<th style="width: 230px;">Date of Loss or Damage
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.LossOrDamageDate)
|
||||
@@ -25,8 +29,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Event Location
|
||||
<th>Event Location
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.EventLocation)
|
||||
@@ -45,8 +48,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Description
|
||||
<th>Description
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.Description)
|
||||
@@ -65,8 +67,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
|
||||
<th style="width: 200px;">
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused)@Html.LabelFor(m => m.Job.JobMetaInsurance.ThirdPartyCaused)
|
||||
@@ -74,15 +75,13 @@
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<div id="Job_JobMetaInsurance_ThirdPartyCaused_Details" style="padding-left: 25px;">
|
||||
<div>
|
||||
<h5>
|
||||
Third Party Name</h5>
|
||||
<h5>Third Party Name</h5>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedName)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
</div>
|
||||
<div>
|
||||
<h5>
|
||||
Why Third Parties Fault</h5>
|
||||
<h5>Why Third Parties Fault</h5>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.ThirdPartyCausedWhy)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
@@ -133,8 +132,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Witnessed by (Name/Address)
|
||||
<th>Witnessed by (Name/Address)
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.WitnessesNamesAddresses)
|
||||
@@ -153,8 +151,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Burglary/Theft - Method of Entry
|
||||
<th>Burglary/Theft - Method of Entry
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.BurglaryTheftMethodOfEntry)
|
||||
@@ -173,8 +170,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Property Last Seen
|
||||
<th style="width: 200px;">Property Last Seen
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.PropertyLastSeenDate)
|
||||
@@ -194,8 +190,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
|
||||
<th style="width: 200px;">
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotified)@Html.LabelFor(m => m.Job.JobMetaInsurance.PoliceNotified)
|
||||
@@ -203,21 +198,18 @@
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<div id="Job_JobMetaInsurance_PoliceNotified_Details" style="padding-left: 25px;">
|
||||
<div>
|
||||
<h5>
|
||||
Station</h5>
|
||||
<h5>Station</h5>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedStation)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
</div>
|
||||
<div>
|
||||
<h5>
|
||||
Date</h5>
|
||||
<h5>Date</h5>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
</div>
|
||||
<div>
|
||||
<h5>
|
||||
Crime Report #</h5>
|
||||
<h5>Crime Report #</h5>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.PoliceNotifiedCrimeReportNo)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
@@ -277,8 +269,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Action to Recover/Reduce Loss
|
||||
<th>Action to Recover/Reduce Loss
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.RecoverReduceAction)
|
||||
@@ -297,8 +288,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Other Interested Parties
|
||||
<th>Other Interested Parties
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.OtherInterestedParties)
|
||||
@@ -317,8 +307,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Date of Purchase
|
||||
<th style="width: 200px;">Date of Purchase
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaInsurance.DateOfPurchase)
|
||||
@@ -339,8 +328,214 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Claim Form Sent Date
|
||||
<th>Claim Form Sent Date
|
||||
</th>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaInsurance.ClaimFormSentDate, "Not Sent", "Job_JobMetaInsurance_ClaimFormSentDate")
|
||||
<span id="Job_JobMetaInsurance_ClaimFormSentUserId">@(string.IsNullOrEmpty(Model.Job.JobMetaInsurance.ClaimFormSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaInsurance.ClaimFormSentUser.ToString()))</span>
|
||||
<script>
|
||||
$(function () {
|
||||
var updateUrl = '@(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)))';
|
||||
var jobOpenDate = '@(Model.Job.OpenedDate.ToJavascriptDateTime())';
|
||||
|
||||
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Claim Form Sent Date', 'Job_JobMetaInsurance_ClaimFormSentDate', 'Job_JobMetaInsurance_ClaimFormSentUserId', 'InsuranceClaimFormSentDate', 'Not Sent', jobOpenDate, false);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<th style="width: 230px;">Date of Loss or Damage
|
||||
</th>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaInsurance.LossOrDamageDate, "Unknown", null)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Event Location
|
||||
</th>
|
||||
<td>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Job.JobMetaInsurance.EventLocation))
|
||||
{
|
||||
<span class="smallMessage"><Unknown/None></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.JobMetaInsurance.EventLocation
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description
|
||||
</th>
|
||||
<td>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Job.JobMetaInsurance.Description))
|
||||
{
|
||||
<span class="smallMessage"><None></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.JobMetaInsurance.Description
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">Caused by Third Party
|
||||
</th>
|
||||
<td>
|
||||
@if (Model.Job.JobMetaInsurance.ThirdPartyCaused)
|
||||
{
|
||||
<div id="Job_JobMetaInsurance_ThirdPartyCaused_Details" style="padding-left: 25px;">
|
||||
<div>
|
||||
<h5>Third Party Name</h5>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Job.JobMetaInsurance.ThirdPartyCausedName))
|
||||
{
|
||||
<span class="smallMessage"><Unknown></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.JobMetaInsurance.ThirdPartyCausedName
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
<h5>Why Third Parties Fault</h5>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Job.JobMetaInsurance.ThirdPartyCausedWhy))
|
||||
{
|
||||
<span class="smallMessage"><Unknown></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.JobMetaInsurance.ThirdPartyCausedWhy
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage"><Not Caused by Third Party></span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Witnessed by (Name/Address)
|
||||
</th>
|
||||
<td>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Job.JobMetaInsurance.WitnessesNamesAddresses))
|
||||
{
|
||||
<span class="smallMessage"><Unknown/None></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.JobMetaInsurance.WitnessesNamesAddresses
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Burglary/Theft - Method of Entry
|
||||
</th>
|
||||
<td>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Job.JobMetaInsurance.BurglaryTheftMethodOfEntry))
|
||||
{
|
||||
<span class="smallMessage"><Unknown/None></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.JobMetaInsurance.BurglaryTheftMethodOfEntry
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">Property Last Seen
|
||||
</th>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaInsurance.PropertyLastSeenDate, "Unknown", null)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Police Notified
|
||||
</th>
|
||||
<td>
|
||||
@if (Model.Job.JobMetaInsurance.PoliceNotified)
|
||||
{
|
||||
<div id="Job_JobMetaInsurance_PoliceNotified_Details" style="padding-left: 25px;">
|
||||
<div>
|
||||
<h5>Station</h5>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Job.JobMetaInsurance.PoliceNotifiedStation))
|
||||
{
|
||||
<span class="smallMessage"><Unknown></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.JobMetaInsurance.PoliceNotifiedStation
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
<h5>Date</h5>
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaInsurance.PoliceNotifiedDate, "Unknown", null)
|
||||
</div>
|
||||
<div>
|
||||
<h5>Crime Report #</h5>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Job.JobMetaInsurance.PoliceNotifiedCrimeReportNo))
|
||||
{
|
||||
<span class="smallMessage"><Unknown></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.JobMetaInsurance.PoliceNotifiedCrimeReportNo
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage"><Not Notified></span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Action to Recover/Reduce Loss
|
||||
</th>
|
||||
<td>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Job.JobMetaInsurance.RecoverReduceAction))
|
||||
{
|
||||
<span class="smallMessage"><Unknown/None></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.JobMetaInsurance.RecoverReduceAction
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Other Interested Parties
|
||||
</th>
|
||||
<td>
|
||||
@if (string.IsNullOrWhiteSpace(Model.Job.JobMetaInsurance.OtherInterestedParties))
|
||||
{
|
||||
<span class="smallMessage"><Unknown/None></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.JobMetaInsurance.OtherInterestedParties
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">Date of Purchase
|
||||
</th>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaInsurance.DateOfPurchase, "Unknown", null)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.InsuranceClaimFormSent))
|
||||
{
|
||||
<tr>
|
||||
<th>Claim Form Sent Date
|
||||
</th>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaInsurance.ClaimFormSentDate, "Not Sent", "Job_JobMetaInsurance_ClaimFormSentDate")
|
||||
@@ -356,21 +551,34 @@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
<tr>
|
||||
<th>
|
||||
Insurance Claim
|
||||
</th>
|
||||
<td>
|
||||
<div style="padding: 8px; text-align: center">
|
||||
@if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim)
|
||||
{
|
||||
@Html.ActionLinkButton("Remove Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, false, true))
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.ActionLinkButton("Add Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, true, true))
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<th>Claim Form Sent Date
|
||||
</th>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaInsurance.ClaimFormSentDate, "Not Sent", "Job_JobMetaInsurance_ClaimFormSentDate")
|
||||
<span id="Job_JobMetaInsurance_ClaimFormSentUserId">@(string.IsNullOrEmpty(Model.Job.JobMetaInsurance.ClaimFormSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaInsurance.ClaimFormSentUser.ToString()))</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.IsInsuranceClaim))
|
||||
{
|
||||
<tr>
|
||||
<th>Insurance Claim
|
||||
</th>
|
||||
<td>
|
||||
<div style="padding: 8px; text-align: center">
|
||||
@if (Model.Job.JobMetaNonWarranty.IsInsuranceClaim)
|
||||
{
|
||||
@Html.ActionLinkButton("Remove Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, false, true))
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.ActionLinkButton("Add Insurance Claim", MVC.API.Job.UpdateNonWarrantyIsInsuranceClaim(Model.Job.Id, true, true))
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,26 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@using Disco.Models.Repository;
|
||||
@{
|
||||
Authorization.Require(Claims.Job.Show);
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
}
|
||||
@switch (Model.Job.JobTypeId)
|
||||
{
|
||||
case JobType.JobTypeIds.HWar:
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Warranty);
|
||||
if (Authorization.Has(Claims.Job.ShowWarranty))
|
||||
{
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Warranty);
|
||||
}
|
||||
break;
|
||||
case JobType.JobTypeIds.HNWar:
|
||||
@Html.Partial(MVC.Job.Views.JobParts.NonWarranty);
|
||||
break;
|
||||
case JobType.JobTypeIds.UMgmt:
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Flags);
|
||||
if (Authorization.Has(Claims.Job.ShowFlags))
|
||||
{
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Flags);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -33,12 +33,14 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
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/Job/JobParts/JobMetaAdditions.cshtml")]
|
||||
public partial class JobMetaAdditions : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
public partial class JobMetaAdditions : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public JobMetaAdditions()
|
||||
{
|
||||
@@ -48,6 +50,8 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
|
||||
#line 3 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.Show);
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
|
||||
|
||||
@@ -56,24 +60,27 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
#line 8 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
switch (Model.Job.JobTypeId)
|
||||
{
|
||||
case JobType.JobTypeIds.HWar:
|
||||
|
||||
if (Authorization.Has(Claims.Job.ShowWarranty))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Warranty));
|
||||
#line 13 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Warranty));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
;
|
||||
#line 13 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
;
|
||||
}
|
||||
break;
|
||||
case JobType.JobTypeIds.HNWar:
|
||||
|
||||
@@ -81,31 +88,34 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
#line 17 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.NonWarranty));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
#line 17 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
;
|
||||
break;
|
||||
case JobType.JobTypeIds.UMgmt:
|
||||
|
||||
if (Authorization.Has(Claims.Job.ShowFlags))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Flags));
|
||||
#line 22 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Flags));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
;
|
||||
#line 22 "..\..\Views\Job\JobParts\JobMetaAdditions.cshtml"
|
||||
;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -1,16 +1,39 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
<div id="jobDetailTab-Components" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Components)
|
||||
</div>
|
||||
<div id="jobDetailTab-NonWarrantyFinance" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.NonWarrantyFinance)
|
||||
</div>
|
||||
<div id="jobDetailTab-NonWarrantyRepairs" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Repairs)
|
||||
</div>
|
||||
<div id="jobDetailTab-NonWarrantyInsurance" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Insurance)
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#jobDetailTabItems').append('<li><a href="#jobDetailTab-Components">Components</a></li><li><a href="#jobDetailTab-NonWarrantyFinance">Finance</a></li><li><a href="#jobDetailTab-NonWarrantyRepairs">Repairs</a></li><li><a href="#jobDetailTab-NonWarrantyInsurance">Insurance</a></li>');
|
||||
</script>
|
||||
@{
|
||||
Authorization.Require(Claims.Job.Show);
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.ShowNonWarrantyComponents))
|
||||
{
|
||||
<div id="jobDetailTab-Components" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Components)
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.ShowNonWarrantyFinance))
|
||||
{
|
||||
<div id="jobDetailTab-NonWarrantyFinance" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.NonWarrantyFinance)
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.ShowNonWarrantyRepairs))
|
||||
{
|
||||
<div id="jobDetailTab-NonWarrantyRepairs" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Repairs)
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.ShowNonWarrantyInsurance))
|
||||
{
|
||||
<div id="jobDetailTab-NonWarrantyInsurance" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Insurance)
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.HasAny(Claims.Job.ShowNonWarrantyComponents, Claims.Job.ShowNonWarrantyFinance, Claims.Job.ShowNonWarrantyRepairs, Claims.Job.ShowNonWarrantyInsurance))
|
||||
{
|
||||
<script type="text/javascript">
|
||||
var addTabItems = '';
|
||||
@if (Authorization.Has(Claims.Job.ShowNonWarrantyComponents)){<text>addTabItems += '<li><a href="#jobDetailTab-Components">Components</a></li>';</text>}
|
||||
@if (Authorization.Has(Claims.Job.ShowNonWarrantyFinance)){<text>addTabItems += '<li><a href="#jobDetailTab-NonWarrantyFinance">Finance</a></li>';</text>}
|
||||
@if (Authorization.Has(Claims.Job.ShowNonWarrantyRepairs)){<text>addTabItems += '<li><a href="#jobDetailTab-NonWarrantyRepairs">Repairs</a></li>';</text>}
|
||||
@if (Authorization.Has(Claims.Job.ShowNonWarrantyInsurance)){<text>addTabItems += '<li><a href="#jobDetailTab-NonWarrantyInsurance">Insurance</a></li>';</text>}
|
||||
$('#jobDetailTabItems').append(addTabItems);
|
||||
</script>
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,19 +28,39 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/JobParts/NonWarranty.cshtml")]
|
||||
public partial class NonWarranty : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
public partial class NonWarranty : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public NonWarranty()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
#line 2 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.Show);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.ShowNonWarrantyComponents))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-Components\"");
|
||||
|
||||
@@ -48,16 +68,33 @@ WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 3 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Components));
|
||||
#line 8 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Components));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n<div");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.ShowNonWarrantyFinance))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-NonWarrantyFinance\"");
|
||||
|
||||
@@ -65,16 +102,33 @@ WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.NonWarrantyFinance));
|
||||
#line 14 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.NonWarrantyFinance));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n<div");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 17 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.ShowNonWarrantyRepairs))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-NonWarrantyRepairs\"");
|
||||
|
||||
@@ -82,16 +136,33 @@ WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Repairs));
|
||||
#line 20 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Repairs));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n<div");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.ShowNonWarrantyInsurance))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-NonWarrantyInsurance\"");
|
||||
|
||||
@@ -99,24 +170,134 @@ WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Insurance));
|
||||
#line 26 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Insurance));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n</div>\r\n<script");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
if (Authorization.HasAny(Claims.Job.ShowNonWarrantyComponents, Claims.Job.ShowNonWarrantyFinance, Claims.Job.ShowNonWarrantyRepairs, Claims.Job.ShowNonWarrantyInsurance))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$('#jobDetailTabItems').append('<li><a href=""#jobDetailTab-Components"">Components</a></li><li><a href=""#jobDetailTab-NonWarrantyFinance"">Finance</a></li><li><a href=""#jobDetailTab-NonWarrantyRepairs"">Repairs</a></li><li><a href=""#jobDetailTab-NonWarrantyInsurance"">Insurance</a></li>');
|
||||
</script>
|
||||
");
|
||||
WriteLiteral(">\r\n var addTabItems = \'\';\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.ShowNonWarrantyComponents)){
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("addTabItems += \'<li><a");
|
||||
|
||||
WriteLiteral(" href=\"#jobDetailTab-Components\"");
|
||||
|
||||
WriteLiteral(">Components</a></li>\';");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 34 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.ShowNonWarrantyFinance)){
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("addTabItems += \'<li><a");
|
||||
|
||||
WriteLiteral(" href=\"#jobDetailTab-NonWarrantyFinance\"");
|
||||
|
||||
WriteLiteral(">Finance</a></li>\';");
|
||||
|
||||
|
||||
#line 34 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.ShowNonWarrantyRepairs)){
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("addTabItems += \'<li><a");
|
||||
|
||||
WriteLiteral(" href=\"#jobDetailTab-NonWarrantyRepairs\"");
|
||||
|
||||
WriteLiteral(">Repairs</a></li>\';");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.ShowNonWarrantyInsurance)){
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("addTabItems += \'<li><a");
|
||||
|
||||
WriteLiteral(" href=\"#jobDetailTab-NonWarrantyInsurance\"");
|
||||
|
||||
WriteLiteral(">Insurance</a></li>\';");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" $(\'#jobDetailTabItems\').append(addTabItems);\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Job\JobParts\NonWarranty.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
|
||||
Authorization.Require(Claims.Job.ShowNonWarrantyFinance);
|
||||
}
|
||||
<table id="jobNonWarrantyFinance">
|
||||
<tr>
|
||||
@@ -43,48 +45,62 @@
|
||||
<th>Purchase Order Reference
|
||||
</th>
|
||||
<td>
|
||||
@Html.TextBoxFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderReference)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $purchaseOrderReference = $('#Job_JobMetaNonWarranty_PurchaseOrderReference');
|
||||
var $ajaxSave = $purchaseOrderReference.next('.ajaxSave');
|
||||
$purchaseOrderReference
|
||||
.watermark('No Reference')
|
||||
.focus(function () { $purchaseOrderReference.select() })
|
||||
.keydown(function (e) {
|
||||
$ajaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).blur(function () {
|
||||
$ajaxSave.hide();
|
||||
})
|
||||
.change(function () {
|
||||
$ajaxSave.hide();
|
||||
$ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { PurchaseOrderReference: $purchaseOrderReference.val() };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderReference(Model.Job.Id, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update purchase order reference: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update purchase order reference: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.PurchaseOrderReference))
|
||||
{
|
||||
@Html.TextBoxFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderReference)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $purchaseOrderReference = $('#Job_JobMetaNonWarranty_PurchaseOrderReference');
|
||||
var $ajaxSave = $purchaseOrderReference.next('.ajaxSave');
|
||||
$purchaseOrderReference
|
||||
.watermark('No Reference')
|
||||
.focus(function () { $purchaseOrderReference.select() })
|
||||
.keydown(function (e) {
|
||||
$ajaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).blur(function () {
|
||||
$ajaxSave.hide();
|
||||
})
|
||||
.change(function () {
|
||||
$ajaxSave.hide();
|
||||
$ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { PurchaseOrderReference: $purchaseOrderReference.val() };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderReference(Model.Job.Id, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update purchase order reference: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update purchase order reference: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaNonWarranty.PurchaseOrderReference))
|
||||
{
|
||||
<span class="smallMessage"><Unknown/None></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.JobMetaNonWarranty.PurchaseOrderReference
|
||||
}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -107,15 +123,21 @@
|
||||
</tr>
|
||||
</table>
|
||||
<script>
|
||||
$(function(){
|
||||
$(function () {
|
||||
var updateUrl = '@(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)))';
|
||||
var jobOpenDate = '@(Model.Job.OpenedDate.ToJavascriptDateTime())';
|
||||
|
||||
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Accounting Charge Required', 'Job_JobMetaNonWarranty_AccountingChargeRequiredDate', 'Job_JobMetaNonWarranty_AccountingChargeRequiredUser', 'NonWarrantyAccountingChargeRequired', 'Not Required', jobOpenDate, false);
|
||||
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Accounting Charge Added', 'Job_JobMetaNonWarranty_AccountingChargeAddedDate', 'Job_JobMetaNonWarranty_AccountingChargeAddedUser', 'NonWarrantyAccountingChargeAdded', 'Not Added', jobOpenDate, false);
|
||||
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Accounting Charge Paid', 'Job_JobMetaNonWarranty_AccountingChargePaidDate', 'Job_JobMetaNonWarranty_AccountingChargePaidUser', 'NonWarrantyAccountingChargePaid', 'Not Paid', jobOpenDate, false);
|
||||
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Purchase Order Raised', 'Job_JobMetaNonWarranty_PurchaseOrderRaisedDate', 'Job_JobMetaNonWarranty_PurchaseOrderRaisedUser', 'NonWarrantyPurchaseOrderRaised', 'Not Raised', jobOpenDate, true);
|
||||
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Purchase Order Sent', 'Job_JobMetaNonWarranty_PurchaseOrderSentDate', 'Job_JobMetaNonWarranty_PurchaseOrderSentUser', 'NonWarrantyPurchaseOrderSent', 'Not Sent', jobOpenDate, true);
|
||||
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Invoice Received', 'Job_JobMetaNonWarranty_InvoiceReceivedDate', 'Job_JobMetaNonWarranty_InvoiceReceivedUser', 'NonWarrantyInvoiceReceived', 'Not Received', jobOpenDate, true);
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.AccountingChargeRequired))
|
||||
{<text>document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Accounting Charge Required', 'Job_JobMetaNonWarranty_AccountingChargeRequiredDate', 'Job_JobMetaNonWarranty_AccountingChargeRequiredUser', 'NonWarrantyAccountingChargeRequired', 'Not Required', jobOpenDate, false);</text>}
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.AccountingChargeAdded))
|
||||
{<text>document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Accounting Charge Added', 'Job_JobMetaNonWarranty_AccountingChargeAddedDate', 'Job_JobMetaNonWarranty_AccountingChargeAddedUser', 'NonWarrantyAccountingChargeAdded', 'Not Added', jobOpenDate, false);</text>}
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.AccountingChargePaid))
|
||||
{<text>document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Accounting Charge Paid', 'Job_JobMetaNonWarranty_AccountingChargePaidDate', 'Job_JobMetaNonWarranty_AccountingChargePaidUser', 'NonWarrantyAccountingChargePaid', 'Not Paid', jobOpenDate, false);</text>}
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.PurchaseOrderRaised))
|
||||
{<text>document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Purchase Order Raised', 'Job_JobMetaNonWarranty_PurchaseOrderRaisedDate', 'Job_JobMetaNonWarranty_PurchaseOrderRaisedUser', 'NonWarrantyPurchaseOrderRaised', 'Not Raised', jobOpenDate, true);</text>}
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.PurchaseOrderSent))
|
||||
{<text>document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Purchase Order Sent', 'Job_JobMetaNonWarranty_PurchaseOrderSentDate', 'Job_JobMetaNonWarranty_PurchaseOrderSentUser', 'NonWarrantyPurchaseOrderSent', 'Not Sent', jobOpenDate, true);</text>}
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.InvoiceReceived))
|
||||
{<text>document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Invoice Received', 'Job_JobMetaNonWarranty_InvoiceReceivedDate', 'Job_JobMetaNonWarranty_InvoiceReceivedUser', 'NonWarrantyInvoiceReceived', 'Not Received', jobOpenDate, true);</text>}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/JobParts/NonWarrantyFinance.cshtml")]
|
||||
public partial class NonWarrantyFinance : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
public partial class NonWarrantyFinance : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public NonWarrantyFinance()
|
||||
{
|
||||
@@ -45,6 +47,8 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
|
||||
Authorization.Require(Claims.Job.ShowNonWarrantyFinance);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -61,7 +65,7 @@ WriteLiteral(">Accounting Charge Required\r\n </th>\r\n <td>\r\n")
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 12 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.AccountingChargeRequiredDate, "Not Required", "Job_JobMetaNonWarranty_AccountingChargeRequiredDate"));
|
||||
|
||||
|
||||
@@ -74,7 +78,7 @@ WriteLiteral(" id=\"Job_JobMetaNonWarranty_AccountingChargeRequiredUser\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 11 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 13 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUser.ToString()));
|
||||
|
||||
|
||||
@@ -85,7 +89,7 @@ WriteLiteral("</span>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 14 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
@@ -100,7 +104,7 @@ WriteLiteral(">Accounting Charge Added\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 21 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.AccountingChargeAddedDate, "Not Added", "Job_JobMetaNonWarranty_AccountingChargeAddedDate"));
|
||||
|
||||
|
||||
@@ -113,7 +117,7 @@ WriteLiteral(" id=\"Job_JobMetaNonWarranty_AccountingChargeAddedUser\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 22 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeAddedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeAddedUser.ToString()));
|
||||
|
||||
|
||||
@@ -124,7 +128,7 @@ WriteLiteral("</span>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 23 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
@@ -139,7 +143,7 @@ WriteLiteral(">Accounting Charge Paid\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 30 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.AccountingChargePaidDate, "Not Paid", "Job_JobMetaNonWarranty_AccountingChargePaidDate"));
|
||||
|
||||
|
||||
@@ -152,7 +156,7 @@ WriteLiteral(" id=\"Job_JobMetaNonWarranty_AccountingChargePaidUser\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 31 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargePaidUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargePaidUser.ToString()));
|
||||
|
||||
|
||||
@@ -163,7 +167,7 @@ WriteLiteral("</span>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 32 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
@@ -178,7 +182,7 @@ WriteLiteral(">Purchase Order Raised\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 39 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedDate, "Not Raised", "Job_JobMetaNonWarranty_PurchaseOrderRaisedDate"));
|
||||
|
||||
|
||||
@@ -191,7 +195,7 @@ WriteLiteral(" id=\"Job_JobMetaNonWarranty_PurchaseOrderRaisedUser\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 40 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUser.ToString()));
|
||||
|
||||
|
||||
@@ -202,7 +206,7 @@ WriteLiteral("</span>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 41 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
@@ -211,93 +215,159 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Purchase Order Reference\r\n " +
|
||||
" </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Html.TextBoxFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderReference));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 48 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.PurchaseOrderReference))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 50 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Html.TextBoxFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderReference));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
#line 50 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var $purchaseOrderReference = $('#Job_JobMetaNonWarranty_PurchaseOrderReference');
|
||||
var $ajaxSave = $purchaseOrderReference.next('.ajaxSave');
|
||||
$purchaseOrderReference
|
||||
.watermark('No Reference')
|
||||
.focus(function () { $purchaseOrderReference.select() })
|
||||
.keydown(function (e) {
|
||||
$ajaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).blur(function () {
|
||||
$ajaxSave.hide();
|
||||
})
|
||||
.change(function () {
|
||||
$ajaxSave.hide();
|
||||
$ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { PurchaseOrderReference: $purchaseOrderReference.val() };
|
||||
$.ajax({
|
||||
url: '");
|
||||
$(function () {
|
||||
var $purchaseOrderReference = $('#Job_JobMetaNonWarranty_PurchaseOrderReference');
|
||||
var $ajaxSave = $purchaseOrderReference.next('.ajaxSave');
|
||||
$purchaseOrderReference
|
||||
.watermark('No Reference')
|
||||
.focus(function () { $purchaseOrderReference.select() })
|
||||
.keydown(function (e) {
|
||||
$ajaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).blur(function () {
|
||||
$ajaxSave.hide();
|
||||
})
|
||||
.change(function () {
|
||||
$ajaxSave.hide();
|
||||
$ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { PurchaseOrderReference: $purchaseOrderReference.val() };
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 69 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderReference(Model.Job.Id, null)));
|
||||
#line 73 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderReference(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update purchase order reference: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update purchase order reference: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update purchase order reference: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update purchase order reference: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th");
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 92 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaNonWarranty.PurchaseOrderReference))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral("><Unknown/None></span>\r\n");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 101 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Model.Job.JobMetaNonWarranty.PurchaseOrderReference);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 101 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
@@ -306,7 +376,7 @@ WriteLiteral(">Purchase Order Sent\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 94 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 110 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.PurchaseOrderSentDate, "Not Sent", "Job_JobMetaNonWarranty_PurchaseOrderSentDate"));
|
||||
|
||||
|
||||
@@ -319,7 +389,7 @@ WriteLiteral(" id=\"Job_JobMetaNonWarranty_PurchaseOrderSentUser\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 111 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderSentUser.ToString()));
|
||||
|
||||
|
||||
@@ -330,7 +400,7 @@ WriteLiteral("</span>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 112 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
@@ -345,7 +415,7 @@ WriteLiteral(">Invoice Received\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 119 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.InvoiceReceivedDate, "Not Received", "Job_JobMetaNonWarranty_InvoiceReceivedDate"));
|
||||
|
||||
|
||||
@@ -358,7 +428,7 @@ WriteLiteral(" id=\"Job_JobMetaNonWarranty_InvoiceReceivedUser\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 104 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 120 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.InvoiceReceivedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.InvoiceReceivedUser.ToString()));
|
||||
|
||||
|
||||
@@ -369,17 +439,17 @@ WriteLiteral("</span>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 105 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 121 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n</table>\r\n<script>\r\n $(function(){\r\n var up" +
|
||||
"dateUrl = \'");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n</table>\r\n<script>\r\n $(function () {\r\n var " +
|
||||
"updateUrl = \'");
|
||||
|
||||
|
||||
#line 111 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 127 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)));
|
||||
|
||||
|
||||
@@ -388,34 +458,139 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n</table>\r\n<script>\r\n $(fu
|
||||
WriteLiteral("\';\r\n var jobOpenDate = \'");
|
||||
|
||||
|
||||
#line 112 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
#line 128 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
Write(Model.Job.OpenedDate.ToJavascriptDateTime());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\';\r\n\r\n document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Account" +
|
||||
"ing Charge Required\', \'Job_JobMetaNonWarranty_AccountingChargeRequiredDate\', \'Jo" +
|
||||
"b_JobMetaNonWarranty_AccountingChargeRequiredUser\', \'NonWarrantyAccountingCharge" +
|
||||
"Required\', \'Not Required\', jobOpenDate, false);\r\n document.DiscoFunctions" +
|
||||
".DateDialogCreateUpdater(updateUrl, \'Accounting Charge Added\', \'Job_JobMetaNonWa" +
|
||||
"rranty_AccountingChargeAddedDate\', \'Job_JobMetaNonWarranty_AccountingChargeAdded" +
|
||||
"User\', \'NonWarrantyAccountingChargeAdded\', \'Not Added\', jobOpenDate, false);\r\n " +
|
||||
" document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Accounting Cha" +
|
||||
"rge Paid\', \'Job_JobMetaNonWarranty_AccountingChargePaidDate\', \'Job_JobMetaNonWar" +
|
||||
"ranty_AccountingChargePaidUser\', \'NonWarrantyAccountingChargePaid\', \'Not Paid\', " +
|
||||
"jobOpenDate, false);\r\n document.DiscoFunctions.DateDialogCreateUpdater(up" +
|
||||
"dateUrl, \'Purchase Order Raised\', \'Job_JobMetaNonWarranty_PurchaseOrderRaisedDat" +
|
||||
"e\', \'Job_JobMetaNonWarranty_PurchaseOrderRaisedUser\', \'NonWarrantyPurchaseOrderR" +
|
||||
"aised\', \'Not Raised\', jobOpenDate, true);\r\n document.DiscoFunctions.DateD" +
|
||||
"ialogCreateUpdater(updateUrl, \'Purchase Order Sent\', \'Job_JobMetaNonWarranty_Pur" +
|
||||
"chaseOrderSentDate\', \'Job_JobMetaNonWarranty_PurchaseOrderSentUser\', \'NonWarrant" +
|
||||
"yPurchaseOrderSent\', \'Not Sent\', jobOpenDate, true);\r\n document.DiscoFunc" +
|
||||
"tions.DateDialogCreateUpdater(updateUrl, \'Invoice Received\', \'Job_JobMetaNonWarr" +
|
||||
"anty_InvoiceReceivedDate\', \'Job_JobMetaNonWarranty_InvoiceReceivedUser\', \'NonWar" +
|
||||
"rantyInvoiceReceived\', \'Not Received\', jobOpenDate, true);\r\n });\r\n</script>\r\n" +
|
||||
WriteLiteral("\';\r\n\r\n");
|
||||
|
||||
|
||||
#line 130 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 130 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.AccountingChargeRequired))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Accounting Charge Required', 'Job_JobMetaNonWarranty_AccountingChargeRequiredDate', 'Job_JobMetaNonWarranty_AccountingChargeRequiredUser', 'NonWarrantyAccountingChargeRequired', 'Not Required', jobOpenDate, false);");
|
||||
|
||||
|
||||
#line 131 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 132 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.AccountingChargeAdded))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Accounting Charge Added', 'Job_JobMetaNonWarranty_AccountingChargeAddedDate', 'Job_JobMetaNonWarranty_AccountingChargeAddedUser', 'NonWarrantyAccountingChargeAdded', 'Not Added', jobOpenDate, false);");
|
||||
|
||||
|
||||
#line 133 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 134 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.AccountingChargePaid))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Accounting Charge Pai" +
|
||||
"d\', \'Job_JobMetaNonWarranty_AccountingChargePaidDate\', \'Job_JobMetaNonWarranty_A" +
|
||||
"ccountingChargePaidUser\', \'NonWarrantyAccountingChargePaid\', \'Not Paid\', jobOpen" +
|
||||
"Date, false);");
|
||||
|
||||
|
||||
#line 135 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 136 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.PurchaseOrderRaised))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Purchase Order Raised" +
|
||||
"\', \'Job_JobMetaNonWarranty_PurchaseOrderRaisedDate\', \'Job_JobMetaNonWarranty_Pur" +
|
||||
"chaseOrderRaisedUser\', \'NonWarrantyPurchaseOrderRaised\', \'Not Raised\', jobOpenDa" +
|
||||
"te, true);");
|
||||
|
||||
|
||||
#line 137 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 138 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.PurchaseOrderSent))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Purchase Order Sent\'," +
|
||||
" \'Job_JobMetaNonWarranty_PurchaseOrderSentDate\', \'Job_JobMetaNonWarranty_Purchas" +
|
||||
"eOrderSentUser\', \'NonWarrantyPurchaseOrderSent\', \'Not Sent\', jobOpenDate, true);" +
|
||||
"");
|
||||
|
||||
|
||||
#line 139 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 140 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.InvoiceReceived))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Invoice Received\', \'J" +
|
||||
"ob_JobMetaNonWarranty_InvoiceReceivedDate\', \'Job_JobMetaNonWarranty_InvoiceRecei" +
|
||||
"vedUser\', \'NonWarrantyInvoiceReceived\', \'Not Received\', jobOpenDate, true);");
|
||||
|
||||
|
||||
#line 141 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" });\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,59 +1,77 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.Job.ShowNonWarrantyFinance);
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
}
|
||||
<table id="jobNonWarrantyRepairs">
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Repairer Name
|
||||
<th style="width: 200px;">Repairer Name
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerName)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaNonWarranty_RepairerName'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerName(Model.Job.Id, null))',
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerName))
|
||||
{
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerName)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaNonWarranty_RepairerName'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerName(Model.Job.Id, null))',
|
||||
'RepairerName'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaNonWarranty.RepairerName))
|
||||
{<span class="smallMessage"><Unknown/None></span>}
|
||||
else
|
||||
{@Model.Job.JobMetaNonWarranty.RepairerName}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Repair Logged
|
||||
<th style="width: 200px;">Repair Logged
|
||||
</th>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.RepairerLoggedDate, "Not Logged", "Job_JobMetaNonWarranty_RepairerLoggedDate")
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Repair Reference
|
||||
<th style="width: 200px;">Repair Reference
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerReference)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaNonWarranty_RepairerReference'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerReference(Model.Job.Id, null))',
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerReference))
|
||||
{
|
||||
@Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerReference)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaNonWarranty_RepairerReference'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerReference(Model.Job.Id, null))',
|
||||
'RepairerReference'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaNonWarranty.RepairerReference))
|
||||
{<span class="smallMessage"><Unknown/None></span>}
|
||||
else
|
||||
{@Model.Job.JobMetaNonWarranty.RepairerReference}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Repair Completed
|
||||
<th style="width: 200px;">Repair Completed
|
||||
</th>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.RepairerCompletedDate, "Not Completed", "Job_JobMetaNonWarranty_RepairerCompletedDate")
|
||||
@@ -65,7 +83,9 @@
|
||||
var updateUrl = '@(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)))';
|
||||
var jobOpenDate = '@(Model.Job.OpenedDate.ToJavascriptDateTime())';
|
||||
|
||||
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Repairer Name', 'Job_JobMetaNonWarranty_RepairerLoggedDate', null, 'NonWarrantyRepairerLoggedDate', 'Not Logged', jobOpenDate, false);
|
||||
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Repair Completed', 'Job_JobMetaNonWarranty_RepairerCompletedDate', null, 'NonWarrantyRepairerCompletedDate', 'Not Completed', jobOpenDate, false);
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerLoggedDate))
|
||||
{<text>document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Repairer Name', 'Job_JobMetaNonWarranty_RepairerLoggedDate', null, 'NonWarrantyRepairerLoggedDate', 'Not Logged', jobOpenDate, false);</text>}
|
||||
@if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerCompletedDate))
|
||||
{<text>document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Repair Completed', 'Job_JobMetaNonWarranty_RepairerCompletedDate', null, 'NonWarrantyRepairerCompletedDate', 'Not Completed', jobOpenDate, false);</text>}
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/JobParts/Repairs.cshtml")]
|
||||
public partial class Repairs : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
public partial class Repairs : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public Repairs()
|
||||
{
|
||||
@@ -43,6 +45,8 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
|
||||
#line 2 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.ShowNonWarrantyFinance);
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");
|
||||
|
||||
|
||||
@@ -56,67 +60,134 @@ WriteLiteral(">\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Repairer Name\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 11 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(">Repairer Name\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerName))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
#line 14 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 16 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 16 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFunctions.P" +
|
||||
"ropertyChangeHelper(\r\n $(\'#Job_JobMetaNonWarranty_Rep" +
|
||||
"airerName\'),\r\n \'Unknown\',\r\n " +
|
||||
" \'");
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaNonWarranty_RepairerName'),
|
||||
'Unknown',
|
||||
'");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerName(Model.Job.Id, null)));
|
||||
#line 22 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerName(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'RepairerName\'\r\n );\r\n " +
|
||||
" });\r\n </script>\r\n </td>\r\n </tr>\r\n <tr>\r\n " +
|
||||
" <th");
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaNonWarranty.RepairerName))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral("><Unknown/None></span>");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Model.Job.JobMetaNonWarranty.RepairerName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Repair Logged\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(">Repair Logged\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
#line 41 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.RepairerLoggedDate, "Not Logged", "Job_JobMetaNonWarranty_RepairerLoggedDate"));
|
||||
|
||||
|
||||
@@ -126,67 +197,134 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Repair Reference\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(">Repair Reference\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerReference));
|
||||
#line 48 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 48 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerReference))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 50 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaNonWarranty.RepairerReference));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
#line 50 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
#line 51 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 52 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
#line 52 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFunctions.P" +
|
||||
"ropertyChangeHelper(\r\n $(\'#Job_JobMetaNonWarranty_Rep" +
|
||||
"airerReference\'),\r\n \'Unknown\',\r\n " +
|
||||
" \'");
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaNonWarranty_RepairerReference'),
|
||||
'Unknown',
|
||||
'");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerReference(Model.Job.Id, null)));
|
||||
#line 58 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateNonWarrantyRepairerReference(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'RepairerReference\'\r\n );\r\n" +
|
||||
" });\r\n </script>\r\n </td>\r\n </tr>\r\n <tr>\r\n" +
|
||||
" <th");
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaNonWarranty.RepairerReference))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral("><Unknown/None></span>");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 69 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Model.Job.JobMetaNonWarranty.RepairerReference);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 69 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Repair Completed\r\n </th>\r\n <td>\r\n");
|
||||
WriteLiteral(">Repair Completed\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 59 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
#line 77 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.RepairerCompletedDate, "Not Completed", "Job_JobMetaNonWarranty_RepairerCompletedDate"));
|
||||
|
||||
|
||||
@@ -196,7 +334,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n</table>\r\n<script>\r\n $(fu
|
||||
"updateUrl = \'");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
#line 83 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)));
|
||||
|
||||
|
||||
@@ -205,18 +343,59 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n</table>\r\n<script>\r\n $(fu
|
||||
WriteLiteral("\';\r\n var jobOpenDate = \'");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
#line 84 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
Write(Model.Job.OpenedDate.ToJavascriptDateTime());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"';
|
||||
WriteLiteral("\';\r\n\r\n");
|
||||
|
||||
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Repairer Name', 'Job_JobMetaNonWarranty_RepairerLoggedDate', null, 'NonWarrantyRepairerLoggedDate', 'Not Logged', jobOpenDate, false);
|
||||
document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, 'Repair Completed', 'Job_JobMetaNonWarranty_RepairerCompletedDate', null, 'NonWarrantyRepairerCompletedDate', 'Not Completed', jobOpenDate, false);
|
||||
});
|
||||
</script>");
|
||||
|
||||
#line 86 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 86 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerLoggedDate))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Repairer Name\', \'Job_" +
|
||||
"JobMetaNonWarranty_RepairerLoggedDate\', null, \'NonWarrantyRepairerLoggedDate\', \'" +
|
||||
"Not Logged\', jobOpenDate, false);");
|
||||
|
||||
|
||||
#line 87 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 88 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.NonWarrantyProperties.RepairerCompletedDate))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Repair Completed\', \'J" +
|
||||
"ob_JobMetaNonWarranty_RepairerCompletedDate\', null, \'NonWarrantyRepairerComplete" +
|
||||
"dDate\', \'Not Completed\', jobOpenDate, false);");
|
||||
|
||||
|
||||
#line 89 "..\..\Views\Job\JobParts\Repairs.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" });\r\n</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,226 +1,320 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
Authorization.RequireAny(Claims.Job.ShowLogs, Claims.Job.ShowAttachments);
|
||||
|
||||
var canShowLogs = Authorization.Has(Claims.Job.ShowLogs);
|
||||
var canShowAttachments = Authorization.Has(Claims.Job.ShowAttachments);
|
||||
|
||||
var canAddLogs = Authorization.Has(Claims.Job.Actions.AddLogs);
|
||||
var canRemoveAnyLogs = Authorization.Has(Claims.Job.Actions.RemoveAnyLogs);
|
||||
var canRemoveOwnLogs = Authorization.Has(Claims.Job.Actions.RemoveOwnLogs);
|
||||
|
||||
var canAddAttachments = Authorization.Has(Claims.Job.Actions.AddAttachments);
|
||||
var canRemoveAnyAttachments = Authorization.Has(Claims.Job.Actions.RemoveAnyAttachments);
|
||||
var canRemoveOwnAttachments = Authorization.Has(Claims.Job.Actions.RemoveOwnAttachments);
|
||||
|
||||
if (canShowAttachments)
|
||||
{
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
}
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
|
||||
}
|
||||
<table id="jobShowResources">
|
||||
<tr>
|
||||
<td id="Comments">
|
||||
<div class="commentOutput">
|
||||
@foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp))
|
||||
<tr class="@(canShowLogs ? "canShowLogs" : "cannotShowLogs") @(canShowAttachments ? "canShowAttachments" : "cannotShowAttachments")">
|
||||
@if (canShowLogs)
|
||||
{
|
||||
<td id="Comments" class="@(canAddLogs ? "canAddLogs" : "cannotAddLogs")">
|
||||
<div class="commentOutput">
|
||||
@foreach (var jl in Model.Job.JobLogs.OrderBy(m => m.Timestamp))
|
||||
{
|
||||
<div data-logid="@jl.Id">
|
||||
<span class="author">@jl.TechUser.ToString()</span>@if (canRemoveAnyLogs || (canRemoveOwnLogs && jl.TechUserId == CurrentUser.Id))
|
||||
{<text><span class="remove"></span></text>}<span class="timestamp" title="@jl.Timestamp.ToFullDateTime()">@jl.Timestamp.ToFuzzy()</span>
|
||||
<span class="comment">@jl.Comments.ToMultilineJobRefString()</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (canAddLogs)
|
||||
{
|
||||
<div data-logid="@jl.Id">
|
||||
<span class="author">@jl.TechUser.ToString()</span><span class="remove"></span><span class="timestamp" title="@jl.Timestamp.ToFullDateTime()">@jl.Timestamp.ToFuzzy()</span>
|
||||
<span class="comment">@jl.Comments.ToMultilineJobRefString()</span>
|
||||
<div class="commentInput clearfix">
|
||||
<textarea class="commentInput" accesskey="l"></textarea>
|
||||
<span class="action post commentInputPost"></span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="commentInput clearfix">
|
||||
<textarea class="commentInput" accesskey="l"></textarea>
|
||||
<span class="action post commentInputPost"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td id="Attachments">
|
||||
<div class="attachmentOutput">
|
||||
@foreach (var ja in Model.Job.JobAttachments)
|
||||
</td>
|
||||
}
|
||||
@if (canShowAttachments)
|
||||
{
|
||||
<td id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
||||
<div class="attachmentOutput">
|
||||
@foreach (var ja in Model.Job.JobAttachments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))" data-attachmentid="@ja.Id" data-mimetype="@ja.MimeType">
|
||||
<span class="icon" title="@ja.Filename">
|
||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)))" /></span>
|
||||
<span class="comments" title="@ja.Comments">
|
||||
@{if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||
{ @ja.DocumentTemplate.Description}
|
||||
else
|
||||
{ @ja.Comments }}
|
||||
</span><span class="author">@ja.TechUser.ToString()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ja.TechUserId == CurrentUser.Id))
|
||||
{<text><span class="remove"></span></text>}<span class="timestamp" title="@ja.Timestamp.ToFullDateTime()">@ja.Timestamp.ToFuzzy()</span>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
@if (canAddAttachments)
|
||||
{
|
||||
<a href="@Url.Action(MVC.API.Job.AttachmentDownload(ja.Id))" data-attachmentid="@ja.Id" data-mimetype="@ja.MimeType">
|
||||
<span class="icon" title="@ja.Filename">
|
||||
<img alt="Attachment Thumbnail" src="@(Url.Action(MVC.API.Job.AttachmentThumbnail(ja.Id)))" /></span>
|
||||
<span class="comments" title="@ja.Comments">
|
||||
@{if (!string.IsNullOrEmpty(ja.DocumentTemplateId))
|
||||
{ @ja.DocumentTemplate.Description}
|
||||
else
|
||||
{ @ja.Comments }}
|
||||
</span><span class="author">@ja.TechUser.ToString()</span><span class="remove"></span><span class="timestamp" title="@ja.Timestamp.ToFullDateTime()">@ja.Timestamp.ToFuzzy()</span>
|
||||
</a>
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action upload"></span><span class="action photo"></span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action upload"></span><span class="action photo"></span>
|
||||
</div>
|
||||
</td>
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
</table>
|
||||
<div id="dialogUpload" class="hiddenDialog" title="Upload Attachment">
|
||||
<div id="silverlightHostUploadAttachment">
|
||||
@if (canShowLogs && (canRemoveAnyLogs || canRemoveOwnLogs))
|
||||
{
|
||||
<div id="dialogRemoveLog" class="hiddenDialog" title="Remove this Comment?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogRemoveLog" class="hiddenDialog" title="Remove this Comment?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<div id="dialogRemoveAttachment" class="hiddenDialog" title="Remove this Attachment?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
<script>
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
|
||||
|
||||
$(function () {
|
||||
var jobId = parseInt('@(Model.Job.Id)');
|
||||
|
||||
//#region Comments
|
||||
var $Comments = $('#Comments');
|
||||
var $CommentOutput = $Comments.find('.commentOutput');
|
||||
var $CommentOutputContainer = $Comments.find('.commentOutputContainer');
|
||||
var $CommentInput = $Comments.find('textarea.commentInput');
|
||||
var $dialogRemoveLog;
|
||||
|
||||
window.setTimeout(function () {
|
||||
$CommentOutput[0].scrollTop = $CommentOutput[0].scrollHeight; // Scroll to Bottom
|
||||
}, 0);
|
||||
$('#jobDetailTabs').on('tabsactivate', function (event, ui) {
|
||||
if (ui.newPanel && ui.newPanel.is('#jobDetailTab-Resources')) {
|
||||
$CommentOutput[0].scrollTop = $CommentOutput[0].scrollHeight; // Scroll to Bottom
|
||||
}
|
||||
});
|
||||
|
||||
$Comments.find('.commentInputPost').click(postComment);
|
||||
$CommentInput.keypress(function (e) {
|
||||
if (e.which == 13 && !e.shiftKey) {
|
||||
postComment();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$CommentOutput.find('span.remove').click(removePost);
|
||||
|
||||
function postComment() {
|
||||
var comment = $CommentInput.val();
|
||||
if (comment != '') {
|
||||
var data = { comment: comment }
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.CommentPost(Model.Job.Id, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
// Should be added via Repository Notifications
|
||||
// addComment(d.Comment, false);
|
||||
$CommentInput.val('').attr('disabled', false).focus();
|
||||
} else {
|
||||
alert('Unable to post comment: ' + d.Result);
|
||||
$CommentInput.attr('disabled', false);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to post comment: ' + textStatus);
|
||||
$CommentInput.attr('disabled', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function removePost() {
|
||||
$this = $(this);
|
||||
var data = { id: $this.closest('div').attr('data-logid') };
|
||||
|
||||
if (!$dialogRemoveLog) {
|
||||
$dialogRemoveLog = $('#dialogRemoveLog').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
|
||||
$dialogRemoveLog.dialog("enable").dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveLog.dialog("disable");
|
||||
$dialogRemoveLog.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.CommentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
// Should be removed via Repository Notifications
|
||||
//$this.closest('div').slideUp(300).delay(300).queue(function () {
|
||||
// $(this).remove();
|
||||
//});
|
||||
} else {
|
||||
alert('Unable to remove comment: ' + d);
|
||||
}
|
||||
$dialogRemoveLog.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove comment: ' + textStatus);
|
||||
$dialogRemoveLog.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemoveLog.dialog("close");
|
||||
}
|
||||
}).dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
function loadLiveComment(key) {
|
||||
if (key.JobId == jobId) {
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.Comment())',
|
||||
dataType: 'json',
|
||||
data: { id: key.Id },
|
||||
success: function (d) {
|
||||
if (d && d.JobId == jobId) {
|
||||
addComment(d, false);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to load live comment ' + id + ': ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function addComment(c, quick) {
|
||||
var e = $('<div><span class="author" /><span class="remove" /><span class="timestamp" /><span class="comment" /></div>');
|
||||
e.attr('data-logid', c.Id);
|
||||
e.find('.author').text(c.Author);
|
||||
e.find('.timestamp').text(c.TimestampFuzzy).attr('title', c.TimestampFull);
|
||||
e.find('.remove').click(removePost);
|
||||
var eComment = e.find('.comment').text(c.Comments);
|
||||
var commentHtml = eComment.text().replace(/\r\n|\r|\n/g, '<br />');
|
||||
commentHtml = commentHtml.replace(/\#(\d+)/g, '<a href="@Url.Action(MVC.Job.Show(null))?id=$1">#$1</a>');
|
||||
eComment.html(commentHtml);
|
||||
|
||||
$CommentOutput.append(e);
|
||||
|
||||
if (!quick) {
|
||||
e.animate({ backgroundColor: '#ffff99' }, 500, function () {
|
||||
e.animate({ backgroundColor: '#f4f4f4' }, 500);
|
||||
});
|
||||
$CommentOutput.animate({ scrollTop: $CommentOutput[0].scrollHeight }, 250)
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
//#region Attachments
|
||||
}
|
||||
@if (canShowAttachments && canAddAttachments)
|
||||
{
|
||||
<div id="dialogUpload" class="hiddenDialog" title="Upload Attachment">
|
||||
<div id="silverlightHostUploadAttachment">
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (canShowAttachments && (canRemoveAnyAttachments || canRemoveOwnAttachments))
|
||||
{
|
||||
<div id="dialogRemoveAttachment" class="hiddenDialog" title="Remove this Attachment?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
@if (canShowLogs)
|
||||
{
|
||||
<script>
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
// For Silverlight Backwards-compatibility
|
||||
// - Repository notifications now handles this
|
||||
document.DiscoFunctions.addAttachment = function () { };
|
||||
|
||||
var $Attachments = $('#Attachments');
|
||||
var $attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
var $dialogUpload, $dialogRemoveAttachment;
|
||||
$(function () {
|
||||
var jobId = parseInt('@(Model.Job.Id)');
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeLocalAttachment);
|
||||
//#region Comments
|
||||
var $Comments = $('#Comments');
|
||||
var $CommentOutput = $Comments.find('.commentOutput');
|
||||
var $CommentOutputContainer = $Comments.find('.commentOutputContainer');
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'@(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap)',
|
||||
window.setTimeout(function () {
|
||||
$CommentOutput[0].scrollTop = $CommentOutput[0].scrollHeight; // Scroll to Bottom
|
||||
}, 0);
|
||||
$('#jobDetailTabs').on('tabsactivate', function (event, ui) {
|
||||
if (ui.newPanel && ui.newPanel.is('#jobDetailTab-Resources')) {
|
||||
$CommentOutput[0].scrollTop = $CommentOutput[0].scrollHeight; // Scroll to Bottom
|
||||
}
|
||||
});
|
||||
|
||||
@if (canAddLogs)
|
||||
{<text>
|
||||
//#region Add Logs
|
||||
|
||||
var $CommentInput = $Comments.find('textarea.commentInput');
|
||||
|
||||
$Comments.find('.commentInputPost').click(postComment);
|
||||
$CommentInput.keypress(function (e) {
|
||||
if (e.which == 13 && !e.shiftKey) {
|
||||
postComment();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
function postComment() {
|
||||
var comment = $CommentInput.val();
|
||||
if (comment != '') {
|
||||
var data = { comment: comment }
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.CommentPost(Model.Job.Id, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
// Should be added via Repository Notifications
|
||||
// addComment(d.Comment, false);
|
||||
$CommentInput.val('').attr('disabled', false).focus();
|
||||
} else {
|
||||
alert('Unable to post comment: ' + d.Result);
|
||||
$CommentInput.attr('disabled', false);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to post comment: ' + textStatus);
|
||||
$CommentInput.attr('disabled', false);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//#endregion
|
||||
</text>}
|
||||
@if (canRemoveAnyLogs || canRemoveOwnLogs)
|
||||
{<text>
|
||||
//#region Remove Logs
|
||||
|
||||
var $dialogRemoveLog;
|
||||
|
||||
$CommentOutput.find('span.remove').click(removePost);
|
||||
|
||||
function removePost() {
|
||||
$this = $(this);
|
||||
var data = { id: $this.closest('div').attr('data-logid') };
|
||||
|
||||
if (!$dialogRemoveLog) {
|
||||
$dialogRemoveLog = $('#dialogRemoveLog').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
|
||||
$dialogRemoveLog.dialog("enable").dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveLog.dialog("disable");
|
||||
$dialogRemoveLog.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.CommentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
// Should be removed via Repository Notifications
|
||||
//$this.closest('div').slideUp(300).delay(300).queue(function () {
|
||||
// $(this).remove();
|
||||
//});
|
||||
} else {
|
||||
alert('Unable to remove comment: ' + d);
|
||||
}
|
||||
$dialogRemoveLog.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove comment: ' + textStatus);
|
||||
$dialogRemoveLog.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemoveLog.dialog("close");
|
||||
}
|
||||
}).dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
</text>}
|
||||
|
||||
function loadLiveComment(key) {
|
||||
if (key.JobId == jobId) {
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.Comment())',
|
||||
dataType: 'json',
|
||||
data: { id: key.Id },
|
||||
success: function (d) {
|
||||
if (d && d.JobId == jobId) {
|
||||
@if (canRemoveAnyLogs)
|
||||
{<text>addComment(d, false, true);</text>}
|
||||
else if (canRemoveOwnLogs)
|
||||
{<text>addComment(d, false, (d.AuthorId === '@(CurrentUser.Id)'));</text>}
|
||||
else
|
||||
{<text>addComment(d, false, false);</text>}
|
||||
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to load live comment ' + id + ': ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function liveRemoveComment(key) {
|
||||
$CommentOutput.children('div[data-logid="' + key + '"]').slideUp(300).delay(300).queue(function () {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
function addComment(c, quick, canRemove) {
|
||||
var t = '<div><span class="author" />';
|
||||
if (canRemove)
|
||||
t += '<span class="remove" />';
|
||||
t += '<span class="timestamp" /><span class="comment" /></div>';
|
||||
|
||||
var e = $(t);
|
||||
e.attr('data-logid', c.Id);
|
||||
e.find('.author').text(c.Author);
|
||||
e.find('.timestamp').text(c.TimestampFuzzy).attr('title', c.TimestampFull);
|
||||
if (canRemove)
|
||||
e.find('.remove').click(removePost);
|
||||
var eComment = e.find('.comment').text(c.Comments);
|
||||
var commentHtml = eComment.text().replace(/\r\n|\r|\n/g, '<br />');
|
||||
commentHtml = commentHtml.replace(/\#(\d+)/g, '<a href="@Url.Action(MVC.Job.Show(null))?id=$1">#$1</a>');
|
||||
eComment.html(commentHtml);
|
||||
|
||||
$CommentOutput.append(e);
|
||||
|
||||
if (!quick) {
|
||||
e.animate({ backgroundColor: '#ffff99' }, 500, function () {
|
||||
e.animate({ backgroundColor: '#f4f4f4' }, 500);
|
||||
});
|
||||
$CommentOutput.animate({ scrollTop: $CommentOutput[0].scrollHeight }, 250)
|
||||
}
|
||||
}
|
||||
|
||||
// Add Globally Available Functions
|
||||
document.DiscoFunctions.liveLoadComment = loadLiveComment;
|
||||
document.DiscoFunctions.liveRemoveComment = liveRemoveComment;
|
||||
//#endregion
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@if (canShowAttachments)
|
||||
{
|
||||
<script>
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
|
||||
$(function () {
|
||||
var jobId = parseInt('@(Model.Job.Id)');
|
||||
|
||||
//#region Attachments
|
||||
var $Attachments = $('#Attachments');
|
||||
var $attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
@if (canAddAttachments)
|
||||
{<text>
|
||||
//#region Add Attachments
|
||||
|
||||
// For Silverlight Backwards-compatibility
|
||||
// - Repository notifications now handles this
|
||||
document.DiscoFunctions.addAttachment = function () { };
|
||||
|
||||
var $dialogUpload;
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'@(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap)',
|
||||
$('#silverlightHostUploadAttachment').get(0),
|
||||
'silverlightUploadAttachment',
|
||||
{ width: '840px', height: '500px', background: 'white', version: '4.0.60310.0' },
|
||||
@@ -235,189 +329,299 @@
|
||||
'UploadUrl=@(Url.Action(MVC.API.Job.AttachmentUpload(Model.Job.Id, null)))'
|
||||
);
|
||||
|
||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
var silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
if (!$dialogUpload) {
|
||||
$dialogUpload = $('#dialogUpload').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
$dialogUpload.dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(key, quick) {
|
||||
|
||||
if (key.JobId == jobId) {
|
||||
var data = { id: key.Id };
|
||||
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.Attachment())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
|
||||
if (parseInt(a.ParentId) == jobId) {
|
||||
var e = $('<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span><span class="remove"></span><span class="timestamp"></span></a>');
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.Job.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Job.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
|
||||
e.find('.remove').click(removeLocalAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
}
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
var silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
if (!$dialogUpload) {
|
||||
$dialogUpload = $('#dialogUpload').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function removeAttachment(key) {
|
||||
if (key.JobId == jobId) {
|
||||
var $element = $attachmentOutput.find('a[data-attachmentid="' + key.Id + '"]');
|
||||
if ($element.length > 0) {
|
||||
$element.hide(300).delay(300).queue(function () {
|
||||
if ($element.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
Shadowbox.removeCache(this);
|
||||
$element.remove();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
$dialogUpload.dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
|
||||
function removeLocalAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
//#endregion
|
||||
</text>}
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
@if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{<text>
|
||||
//#region Remove Attachments
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
var $dialogRemoveAttachment;
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeLocalAttachment);
|
||||
|
||||
function removeLocalAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
|
||||
if (!$dialogRemoveAttachment) {
|
||||
$dialogRemoveAttachment = $('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
}
|
||||
|
||||
$dialogRemoveAttachment.dialog("enable").dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("disable");
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.AttachmentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
// Should be removed via Repository Notifications
|
||||
//$this.hide(300).delay(300).queue(function () {
|
||||
// var $this = $(this);
|
||||
// if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
// Shadowbox.removeCache(this);
|
||||
// $this.remove();
|
||||
//});
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
}).dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$dialogRemoveAttachment.dialog("enable").dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("disable");
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
//#endregion
|
||||
|
||||
</text>}
|
||||
|
||||
function addAttachment(key, quick) {
|
||||
|
||||
if (key.JobId == jobId) {
|
||||
var data = { id: key.Id };
|
||||
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.AttachmentRemove())',
|
||||
url: '@Url.Action(MVC.API.Job.Attachment())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
// Should be removed via Repository Notifications
|
||||
//$this.hide(300).delay(300).queue(function () {
|
||||
// var $this = $(this);
|
||||
// if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
// Shadowbox.removeCache(this);
|
||||
// $this.remove();
|
||||
//});
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
@if (canRemoveAnyAttachments)
|
||||
{<text>buildAttachment(a, true);</text>}
|
||||
else if (canRemoveOwnAttachments)
|
||||
{<text>buildAttachment(a, (a.AuthorId === '@(CurrentUser.Id)'));</text>}
|
||||
else
|
||||
{<text>buildAttachment(a, false);</text>}
|
||||
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
},
|
||||
"Cancel": function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
}).dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
});
|
||||
//#endregion
|
||||
|
||||
//#region LiveEvents
|
||||
function liveMessageRecieved(d) {
|
||||
if (d) {
|
||||
window.setTimeout(function () {
|
||||
switch (d.EntityTypeName) {
|
||||
case 'JobAttachment':
|
||||
switch (d.EventType) {
|
||||
case 0: // Added
|
||||
addAttachment(d.EntityKey, false);
|
||||
break;
|
||||
case 1: // Removed
|
||||
removeAttachment(d.EntityKey);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'JobLog':
|
||||
switch (d.EventType) {
|
||||
case 0: // Added
|
||||
loadLiveComment(d.EntityKey);
|
||||
break;
|
||||
case 1: // Removed
|
||||
if (d.EntityKey.JobId == jobId) {
|
||||
$CommentOutput.children('div[data-logid="' + d.EntityKey.Id + '"]').slideUp(300).delay(300).queue(function () {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
var liveMessagesConnection = $.connection('@(Url.Content("~/API/Repository/Notifications"))', { addToGroups: 'JobLog,JobAttachment' })
|
||||
liveMessagesConnection.received(liveMessageRecieved);
|
||||
liveMessagesConnection.error(function (e) {
|
||||
if (e)
|
||||
alert('Error: ' + JSON.stringify(e));
|
||||
function buildAttachment(a, canRemove) {
|
||||
if (parseInt(a.ParentId) == jobId) {
|
||||
var t = '<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span>';
|
||||
if (canRemove)
|
||||
t += '<span class="remove"></span>';
|
||||
t += '<span class="timestamp"></span></a>';
|
||||
|
||||
var e = $(t);
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.Job.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Job.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
|
||||
if (canRemove)
|
||||
e.find('.remove').click(removeLocalAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
}
|
||||
}
|
||||
|
||||
function removeAttachment(key) {
|
||||
if (key.JobId == jobId) {
|
||||
var $element = $attachmentOutput.find('a[data-attachmentid="' + key.Id + '"]');
|
||||
if ($element.length > 0) {
|
||||
$element.hide(300).delay(300).queue(function () {
|
||||
if ($element.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
Shadowbox.removeCache(this);
|
||||
$element.remove();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
});
|
||||
|
||||
// Add Globally Available Functions
|
||||
document.DiscoFunctions.liveAddAttachment = addAttachment;
|
||||
document.DiscoFunctions.liveRemoveAttachment = removeAttachment;
|
||||
|
||||
//#endregion
|
||||
});
|
||||
liveMessagesConnection.start();
|
||||
//#endregion
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</script>
|
||||
}
|
||||
@if (canShowLogs && canShowAttachments)
|
||||
{
|
||||
<script>
|
||||
$(function () {
|
||||
var jobId = parseInt('@(Model.Job.Id)');
|
||||
|
||||
//#region LiveEvents
|
||||
function liveMessageRecieved(d) {
|
||||
if (d) {
|
||||
window.setTimeout(function () {
|
||||
switch (d.EntityTypeName) {
|
||||
case 'JobAttachment':
|
||||
switch (d.EventType) {
|
||||
case 0: // Added
|
||||
document.DiscoFunctions.liveAddAttachment(d.EntityKey, false);
|
||||
break;
|
||||
case 1: // Removed
|
||||
document.DiscoFunctions.liveRemoveAttachment(d.EntityKey);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'JobLog':
|
||||
switch (d.EventType) {
|
||||
case 0: // Added
|
||||
document.DiscoFunctions.liveLoadComment(d.EntityKey);
|
||||
break;
|
||||
case 1: // Removed
|
||||
if (d.EntityKey.JobId == jobId) {
|
||||
document.DiscoFunctions.liveRemoveComment(d.EntityKey.Id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
var liveMessagesConnection = $.connection('@(Url.Content("~/API/Repository/Notifications"))', { addToGroups: 'JobLog,JobAttachment' })
|
||||
liveMessagesConnection.received(liveMessageRecieved);
|
||||
liveMessagesConnection.error(function (e) {
|
||||
if (e)
|
||||
alert('Error: ' + JSON.stringify(e));
|
||||
});
|
||||
liveMessagesConnection.start();
|
||||
//#endregion
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else if (canShowLogs)
|
||||
{
|
||||
<script>
|
||||
$(function () {
|
||||
var jobId = parseInt('@(Model.Job.Id)');
|
||||
|
||||
//#region LiveEvents
|
||||
function liveMessageRecieved(d) {
|
||||
if (d) {
|
||||
window.setTimeout(function () {
|
||||
switch (d.EventType) {
|
||||
case 0: // Added
|
||||
document.DiscoFunctions.liveLoadComment(d.EntityKey);
|
||||
break;
|
||||
case 1: // Removed
|
||||
if (d.EntityKey.JobId == jobId) {
|
||||
document.DiscoFunctions.liveRemoveComment(d.EntityKey.Id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
var liveMessagesConnection = $.connection('@(Url.Content("~/API/Repository/Notifications"))', { addToGroups: 'JobLog' })
|
||||
liveMessagesConnection.received(liveMessageRecieved);
|
||||
liveMessagesConnection.error(function (e) {
|
||||
if (e)
|
||||
alert('Error: ' + JSON.stringify(e));
|
||||
});
|
||||
liveMessagesConnection.start();
|
||||
//#endregion
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else if (canShowAttachments)
|
||||
{
|
||||
<script>
|
||||
$(function () {
|
||||
var jobId = parseInt('@(Model.Job.Id)');
|
||||
|
||||
//#region LiveEvents
|
||||
function liveMessageRecieved(d) {
|
||||
if (d) {
|
||||
window.setTimeout(function () {
|
||||
switch (d.EventType) {
|
||||
case 0: // Added
|
||||
document.DiscoFunctions.liveAddAttachment(d.EntityKey, false);
|
||||
break;
|
||||
case 1: // Removed
|
||||
document.DiscoFunctions.liveRemoveAttachment(d.EntityKey);
|
||||
break;
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
var liveMessagesConnection = $.connection('@(Url.Content("~/API/Repository/Notifications"))', { addToGroups: 'JobAttachment' })
|
||||
liveMessagesConnection.received(liveMessageRecieved);
|
||||
liveMessagesConnection.error(function (e) {
|
||||
if (e)
|
||||
alert('Error: ' + JSON.stringify(e));
|
||||
});
|
||||
liveMessagesConnection.start();
|
||||
//#endregion
|
||||
});
|
||||
</script>
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,127 +1,172 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.Job.ShowWarranty);
|
||||
}
|
||||
<div id="jobDetailTab-Warranty" class="jobPart">
|
||||
<table id="jobNonWarrantyFinance">
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Warranty Provider
|
||||
<th style="width: 200px;">Warranty Provider
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalName)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaWarranty_ExternalName'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateWarrantyExternalName(Model.Job.Id, null))',
|
||||
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalName))
|
||||
{
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalName)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaWarranty_ExternalName'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateWarrantyExternalName(Model.Job.Id, null))',
|
||||
'ExternalName'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalName))
|
||||
{<span class="smallMessage"><Unknown/None></span>}
|
||||
else
|
||||
{<span id="Job_JobMetaWarranty_ExternalName">@Model.Job.JobMetaWarranty.ExternalName</span>}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Warranty Logged
|
||||
<th style="width: 200px;">Warranty Logged
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalLoggedDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalLoggedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateWarrantyExternalLoggedDate(Model.Job.Id, null)))',
|
||||
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalLoggedDate))
|
||||
{
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalLoggedDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalLoggedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateWarrantyExternalLoggedDate(Model.Job.Id, null)))',
|
||||
'ExternalLoggedDate',
|
||||
null
|
||||
);
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Unknown/None", null)
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Warranty Reference
|
||||
<th style="width: 200px;">Warranty Reference
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaWarranty_ExternalReference'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null))',
|
||||
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalReference))
|
||||
{
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference)
|
||||
@AjaxHelpers.AjaxSave()
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaWarranty_ExternalReference'),
|
||||
'Unknown',
|
||||
'@Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null))',
|
||||
'ExternalReference'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalReference))
|
||||
{<span class="smallMessage"><Unknown/None></span>}
|
||||
else
|
||||
{@Model.Job.JobMetaWarranty.ExternalReference}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 200px;">
|
||||
Warranty Completed
|
||||
<th style="width: 200px;">Warranty Completed
|
||||
</th>
|
||||
<td>
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalCompletedDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalCompletedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, null)))',
|
||||
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalCompletedDate))
|
||||
{
|
||||
@Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalCompletedDate)
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalCompletedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'@(Url.Action(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, null)))',
|
||||
'ExternalCompletedDate',
|
||||
null
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="jobWarrantyProviderDetailContainer" style="display: none">
|
||||
<th style="width: 200px;">
|
||||
Provider Details
|
||||
</th>
|
||||
<td>
|
||||
<div id="jobWarrantyProviderDetailLoading">
|
||||
<span class="ajaxHelperIcon ajaxLoading" title="Loading..."></span> Loading...
|
||||
</div>
|
||||
<div id="jobWarrantyProviderDetailHost" class="clearfix" style="display: none">
|
||||
</div>
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
@CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Unknown/None", null)
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
|
||||
{
|
||||
<tr id="jobWarrantyProviderDetailContainer" style="display: none">
|
||||
<th style="width: 200px;">Provider Details
|
||||
</th>
|
||||
<td>
|
||||
<div id="jobWarrantyProviderDetailLoading">
|
||||
<span class="ajaxHelperIcon ajaxLoading" title="Loading..."></span>Loading...
|
||||
</div>
|
||||
<div id="jobWarrantyProviderDetailHost" class="clearfix" style="display: none">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#jobDetailTabItems').append('<li><a href="#jobDetailTab-Warranty">Warranty</a></li>');
|
||||
@if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
|
||||
{<text>
|
||||
$(function () {
|
||||
var warrantyProviderDetailLoaded = false;
|
||||
|
||||
$('#jobDetailTabs').on('tabsactivate', function (e, ui) {
|
||||
if ($(ui.newPanel).is('#jobDetailTab-Warranty')) {
|
||||
if (!warrantyProviderDetailLoaded) {
|
||||
var warrantyExternalName = $('#Job_JobMetaWarranty_ExternalName').val();
|
||||
if (warrantyExternalName) {
|
||||
$('#jobWarrantyProviderDetailContainer').show();
|
||||
$('#jobWarrantyProviderDetailLoading span').show();
|
||||
$('#jobWarrantyProviderDetailHost').load(
|
||||
'@(Url.Action(MVC.Job.WarrantyProviderJobDetails()))',
|
||||
{ id: '@(Model.Job.Id)' },
|
||||
function () {
|
||||
$('#jobWarrantyProviderDetailLoading').hide();
|
||||
$(this).slideDown();
|
||||
}
|
||||
);
|
||||
var warrantyExternalName;
|
||||
var $warrantyExternalName = $('#Job_JobMetaWarranty_ExternalName');
|
||||
if ($warrantyExternalName.length > 0) {
|
||||
if ($warrantyExternalName[0].nodeName === 'INPUT')
|
||||
warrantyExternalName = $warrantyExternalName.val();
|
||||
else
|
||||
warrantyExternalName = $warrantyExternalName.text();
|
||||
if (warrantyExternalName) {
|
||||
$('#jobWarrantyProviderDetailContainer').show();
|
||||
$('#jobWarrantyProviderDetailLoading span').show();
|
||||
$('#jobWarrantyProviderDetailHost').load(
|
||||
'@(Url.Action(MVC.Job.WarrantyProviderJobDetails()))',
|
||||
{ id: '@(Model.Job.Id)' },
|
||||
function () {
|
||||
$('#jobWarrantyProviderDetailLoading').hide();
|
||||
$(this).slideDown();
|
||||
}
|
||||
);
|
||||
|
||||
warrantyProviderDetailLoaded = true;
|
||||
warrantyProviderDetailLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</text>}
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,19 +28,29 @@ namespace Disco.Web.Views.Job.JobParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/JobParts/Warranty.cshtml")]
|
||||
public partial class Warranty : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
public partial class Warranty : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public Warranty()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
#line 2 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.ShowWarranty);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-Warranty\"");
|
||||
|
||||
@@ -54,228 +64,482 @@ WriteLiteral(">\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Warranty Provider\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(">Warranty Provider\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 11 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalName))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 13 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalName));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
#line 13 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 15 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
||||
"ctions.PropertyChangeHelper(\r\n $(\'#Job_JobMetaWarrant" +
|
||||
"y_ExternalName\'),\r\n \'Unknown\',\r\n " +
|
||||
" \'");
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaWarranty_ExternalName'),
|
||||
'Unknown',
|
||||
'");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalName(Model.Job.Id, null)));
|
||||
#line 21 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalName(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'ExternalName\'\r\n );\r\n " +
|
||||
" });\r\n </script>\r\n </td>\r\n </tr>\r" +
|
||||
"\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Warranty Logged\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalLoggedDate));
|
||||
|
||||
#line 26 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalName))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral("><Unknown/None></span>");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" id=\"Job_JobMetaWarranty_ExternalName\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Model.Job.JobMetaWarranty.ExternalName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">Warranty Logged\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalLoggedDate))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 42 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalLoggedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 42 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 43 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 43 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalLoggedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'");
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalLoggedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalLoggedDate(Model.Job.Id, null)));
|
||||
#line 50 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalLoggedDate(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'ExternalLoggedDate\',\r\n null\r\n" +
|
||||
" );\r\n });\r\n </script>\r\n" +
|
||||
" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
" );\r\n });\r\n </s" +
|
||||
"cript>\r\n");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalLoggedDate, "Unknown/None", null));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Warranty Reference\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(">Warranty Reference\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference));
|
||||
#line 67 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 67 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalReference))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 69 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalReference));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
#line 69 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 70 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxSave());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
#line 70 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
#line 71 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
|
||||
"ctions.PropertyChangeHelper(\r\n $(\'#Job_JobMetaWarrant" +
|
||||
"y_ExternalReference\'),\r\n \'Unknown\',\r\n " +
|
||||
" \'");
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#Job_JobMetaWarranty_ExternalReference'),
|
||||
'Unknown',
|
||||
'");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null)));
|
||||
#line 77 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalReference(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'ExternalReference\'\r\n );\r\n" +
|
||||
" });\r\n </script>\r\n </td>\r\n <" +
|
||||
"/tr>\r\n <tr>\r\n <th");
|
||||
" });\r\n </script>\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Model.Job.JobMetaWarranty.ExternalReference))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral("><Unknown/None></span>");
|
||||
|
||||
|
||||
#line 86 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Model.Job.JobMetaWarranty.ExternalReference);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n <tr>\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Warranty Completed\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(">Warranty Completed\r\n </th>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalCompletedDate));
|
||||
#line 96 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 96 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ExternalCompletedDate))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 98 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Html.EditorFor(m => m.Job.JobMetaWarranty.ExternalCompletedDate));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 71 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
#line 98 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 99 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(AjaxHelpers.AjaxLoader());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
#line 99 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalCompletedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'");
|
||||
$(function () {
|
||||
var dateField = $('#Job_JobMetaWarranty_ExternalCompletedDate');
|
||||
document.DiscoFunctions.DateChangeHelper(
|
||||
dateField,
|
||||
'Unknown',
|
||||
'");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, null)));
|
||||
#line 106 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.API.Job.UpdateWarrantyExternalCompletedDate(Model.Job.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n \'ExternalCompletedDate\',\r\n nul" +
|
||||
"l\r\n );\r\n });\r\n </script" +
|
||||
">\r\n </td>\r\n </tr>\r\n <tr");
|
||||
"l\r\n );\r\n });\r\n " +
|
||||
"</script>\r\n");
|
||||
|
||||
|
||||
#line 112 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 115 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaWarranty.ExternalCompletedDate, "Unknown/None", null));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 115 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 119 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 119 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteLiteral(" id=\"jobWarrantyProviderDetailContainer\"");
|
||||
|
||||
WriteLiteral(" style=\"display: none\"");
|
||||
|
||||
WriteLiteral(">\r\n <th");
|
||||
WriteLiteral(">\r\n <th");
|
||||
|
||||
WriteLiteral(" style=\"width: 200px;\"");
|
||||
|
||||
WriteLiteral(">\r\n Provider Details\r\n </th>\r\n <td>\r\n " +
|
||||
" <div");
|
||||
WriteLiteral(">Provider Details\r\n </th>\r\n <td>\r\n " +
|
||||
" <div");
|
||||
|
||||
WriteLiteral(" id=\"jobWarrantyProviderDetailLoading\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ajaxHelperIcon ajaxLoading\"");
|
||||
|
||||
WriteLiteral(" title=\"Loading...\"");
|
||||
|
||||
WriteLiteral("></span> Loading...\r\n </div>\r\n <div");
|
||||
WriteLiteral("></span>Loading...\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"jobWarrantyProviderDetailHost\"");
|
||||
|
||||
@@ -283,57 +547,95 @@ WriteLiteral(" class=\"clearfix\"");
|
||||
|
||||
WriteLiteral(" style=\"display: none\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </td>\r\n </tr>\r\n </table>\r\n</div>" +
|
||||
"\r\n<script");
|
||||
WriteLiteral(">\r\n </div>\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 132 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </table>\r\n</div>\r\n<script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$('#jobDetailTabItems').append('<li><a href=""#jobDetailTab-Warranty"">Warranty</a></li>');
|
||||
WriteLiteral(">\r\n $(\'#jobDetailTabItems\').append(\'<li><a href=\"#jobDetailTab-Warranty\">Warra" +
|
||||
"nty</a></li>\');\r\n");
|
||||
|
||||
|
||||
#line 137 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 137 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Properties.WarrantyProperties.ProviderDetails))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
$(function () {
|
||||
var warrantyProviderDetailLoaded = false;
|
||||
|
||||
$('#jobDetailTabs').on('tabsactivate', function (e, ui) {
|
||||
if ($(ui.newPanel).is('#jobDetailTab-Warranty')) {
|
||||
if (!warrantyProviderDetailLoaded) {
|
||||
var warrantyExternalName = $('#Job_JobMetaWarranty_ExternalName').val();
|
||||
if (warrantyExternalName) {
|
||||
$('#jobWarrantyProviderDetailContainer').show();
|
||||
$('#jobWarrantyProviderDetailLoading span').show();
|
||||
$('#jobWarrantyProviderDetailHost').load(
|
||||
'");
|
||||
var warrantyExternalName;
|
||||
var $warrantyExternalName = $('#Job_JobMetaWarranty_ExternalName');
|
||||
if ($warrantyExternalName.length > 0) {
|
||||
if ($warrantyExternalName[0].nodeName === 'INPUT')
|
||||
warrantyExternalName = $warrantyExternalName.val();
|
||||
else
|
||||
warrantyExternalName = $warrantyExternalName.text();
|
||||
if (warrantyExternalName) {
|
||||
$('#jobWarrantyProviderDetailContainer').show();
|
||||
$('#jobWarrantyProviderDetailLoading span').show();
|
||||
$('#jobWarrantyProviderDetailHost').load(
|
||||
'");
|
||||
|
||||
|
||||
#line 113 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.Job.WarrantyProviderJobDetails()));
|
||||
#line 156 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Url.Action(MVC.Job.WarrantyProviderJobDetails()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n { id: \'");
|
||||
WriteLiteral("\',\r\n { id: \'");
|
||||
|
||||
|
||||
#line 114 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Model.Job.Id);
|
||||
#line 157 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
Write(Model.Job.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"' },
|
||||
function () {
|
||||
$('#jobWarrantyProviderDetailLoading').hide();
|
||||
$(this).slideDown();
|
||||
}
|
||||
);
|
||||
function () {
|
||||
$('#jobWarrantyProviderDetailLoading').hide();
|
||||
$(this).slideDown();
|
||||
}
|
||||
);
|
||||
|
||||
warrantyProviderDetailLoaded = true;
|
||||
warrantyProviderDetailLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
");
|
||||
|
||||
|
||||
#line 171 "..\..\Views\Job\JobParts\Warranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</script>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
|
||||
@{
|
||||
Authorization.Require(Claims.Job.Show);
|
||||
}
|
||||
<table id="Job_Show_Subjects">
|
||||
<tr>
|
||||
<td id="Job_Show_Job">
|
||||
@@ -17,7 +19,9 @@
|
||||
<td>
|
||||
<span title="Expected to Close">Expected:</span>
|
||||
</td>
|
||||
<td>@Html.TextBoxFor(m => m.Job.ExpectedClosedDate, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
|
||||
<td>@if (Authorization.Has(Claims.Job.Properties.ExpectedClosedDate))
|
||||
{
|
||||
@Html.TextBoxFor(m => m.Job.ExpectedClosedDate, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $ajaxSave = $('#Job_ExpectedClosedDate').next('.ajaxSave');
|
||||
@@ -58,6 +62,11 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
@CommonHelpers.FriendlyDate(Model.Job.ExpectedClosedDate)
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@@ -93,81 +102,90 @@
|
||||
<li title="@jobSubType.Id">@jobSubType.Description</li>
|
||||
}
|
||||
</ul>
|
||||
@if (!Model.Job.ClosedDate.HasValue)
|
||||
@if (Authorization.Has(Claims.Job.Actions.UpdateSubTypes) && !Model.Job.ClosedDate.HasValue)
|
||||
{
|
||||
<a href="#" id="Job_Show_Job_SubTypes_Update">Update Sub Types</a>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="Job_Show_Job_SubTypes_Update_Dialog" title="Update Job Types">
|
||||
<div>
|
||||
<h2>
|
||||
@Model.Job.JobType.Description</h2>
|
||||
@using (Html.BeginForm(MVC.API.Job.UpdateSubTypes(Model.Job.Id, redirect: true), FormMethod.Post, new { id = "formUpdateJobTypes" }))
|
||||
{
|
||||
@CommonHelpers.CheckBoxList("SubTypes", Model.UpdatableJobSubTypes.ToSelectListItems(Model.Job.JobSubTypes.ToList()), 3)
|
||||
<hr />
|
||||
<div>
|
||||
<input type="checkbox" value="true" id="UpdateJobTypesAddComponents" name="AddComponents"
|
||||
checked="checked" /><label for="UpdateJobTypesAddComponents">Add Components for newly added Sub Types</label>
|
||||
</div>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Actions.UpdateSubTypes))
|
||||
{
|
||||
<div id="Job_Show_Job_SubTypes_Update_Dialog" title="Update Job Types">
|
||||
<div>
|
||||
<h2>
|
||||
@Model.Job.JobType.Description</h2>
|
||||
@using (Html.BeginForm(MVC.API.Job.UpdateSubTypes(Model.Job.Id, redirect: true), FormMethod.Post, new { id = "formUpdateJobTypes" }))
|
||||
{
|
||||
@CommonHelpers.CheckBoxList("SubTypes", Model.UpdatableJobSubTypes.ToSelectListItems(Model.Job.JobSubTypes.ToList()), 3)
|
||||
<hr />
|
||||
<div>
|
||||
<input type="checkbox" value="true" id="UpdateJobTypesAddComponents" name="AddComponents"
|
||||
checked="checked" /><label for="UpdateJobTypesAddComponents">Add Components for newly added Sub Types</label>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
var $Job_Show_Job_SubTypes_Update_Dialog = null;
|
||||
<script>
|
||||
$(function(){
|
||||
var $Job_Show_Job_SubTypes_Update_Dialog = null;
|
||||
|
||||
$('#Job_Show_Job_SubTypes_Update').click(function () {
|
||||
if (!$Job_Show_Job_SubTypes_Update_Dialog) {
|
||||
$Job_Show_Job_SubTypes_Update_Dialog = $('#Job_Show_Job_SubTypes_Update_Dialog');
|
||||
$Job_Show_Job_SubTypes_Update_Dialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
width: 700,
|
||||
buttons: {
|
||||
"Save": function () {
|
||||
$('#formUpdateJobTypes').submit();
|
||||
$Job_Show_Job_SubTypes_Update_Dialog.dialog("disable");
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
$('#Job_Show_Job_SubTypes_Update').click(function () {
|
||||
if (!$Job_Show_Job_SubTypes_Update_Dialog) {
|
||||
$Job_Show_Job_SubTypes_Update_Dialog = $('#Job_Show_Job_SubTypes_Update_Dialog');
|
||||
$Job_Show_Job_SubTypes_Update_Dialog.dialog({
|
||||
resizable: false,
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
width: 700,
|
||||
buttons: {
|
||||
"Save": function () {
|
||||
$('#formUpdateJobTypes').submit();
|
||||
$Job_Show_Job_SubTypes_Update_Dialog.dialog("disable");
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$Job_Show_Job_SubTypes_Update_Dialog.dialog('open');
|
||||
return false;
|
||||
$Job_Show_Job_SubTypes_Update_Dialog.dialog('open');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
<div id="Job_Show_GenerateDocument_Container" class="status">
|
||||
@Html.DropDownList("Job_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.Job.GeneratePdf(Model.Job.Id.ToString(), null))?DocumentTemplateId=';
|
||||
var $documentTemplates = $('#Job_Show_GenerateDocument');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
window.location.href = generatePdfUrl + v;
|
||||
$documentTemplates.val('').blur();
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Actions.GenerateDocuments))
|
||||
{
|
||||
<div id="Job_Show_GenerateDocument_Container" class="status">
|
||||
@Html.DropDownList("Job_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.Job.GeneratePdf(Model.Job.Id.ToString(), null))?DocumentTemplateId=';
|
||||
var $documentTemplates = $('#Job_Show_GenerateDocument');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
window.location.href = generatePdfUrl + v;
|
||||
$documentTemplates.val('').blur();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
@if (Model.Job.Device != null)
|
||||
{
|
||||
<td id="Job_Show_Device">
|
||||
<div>
|
||||
<h2 id="Job_Show_Device_SerialNumber" title="Serial Number">@Html.ActionLink(Model.Job.DeviceSerialNumber, MVC.Device.Show(Model.Job.DeviceSerialNumber))</h2>
|
||||
<h2 id="Job_Show_Device_SerialNumber" title="Serial Number">@if (Authorization.Has(Claims.Device.Show))
|
||||
{@Html.ActionLink(Model.Job.DeviceSerialNumber, MVC.Device.Show(Model.Job.DeviceSerialNumber))}
|
||||
else
|
||||
{@Model.Job.DeviceSerialNumber}</h2>
|
||||
<div class="clearfix">
|
||||
<div id="Job_Show_Device_Details">
|
||||
<img id="Job_Show_Device_Model_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(Model.Job.Device.DeviceModelId, Model.Job.Device.DeviceModel.ImageHash()))" />
|
||||
@@ -247,7 +265,22 @@
|
||||
<table class="none">
|
||||
<tr>
|
||||
<td>Location:</td>
|
||||
<td>@Html.TextBoxFor(m => m.Job.DeviceHeldLocation, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()</td>
|
||||
<td>
|
||||
<span id="Job_Show_Device_DeviceHeld_Location">
|
||||
@if (Authorization.Has(Claims.Job.Properties.DeviceHeldLocation))
|
||||
{
|
||||
@Html.TextBoxFor(m => m.Job.DeviceHeldLocation, new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
|
||||
}
|
||||
else if (string.IsNullOrEmpty(Model.Job.DeviceHeldLocation))
|
||||
{
|
||||
<span class="smallMessage"><None/Unknown></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Model.Job.DeviceHeldLocation
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Held Since:</td>
|
||||
@@ -268,47 +301,49 @@
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
@if (Authorization.Has(Claims.Job.Properties.DeviceHeldLocation))
|
||||
{
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $deviceHeldLocation = $('#Job_DeviceHeldLocation');
|
||||
var $ajaxSave = $deviceHeldLocation.next('.ajaxSave');
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $deviceHeldLocation = $('#Job_DeviceHeldLocation');
|
||||
var $ajaxSave = $deviceHeldLocation.next('.ajaxSave');
|
||||
|
||||
$deviceHeldLocation
|
||||
.watermark('Unknown')
|
||||
.focus(function () { $deviceHeldLocation.select() })
|
||||
.keydown(function (e) {
|
||||
$ajaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).blur(function () {
|
||||
$ajaxSave.hide();
|
||||
})
|
||||
.change(function () {
|
||||
$ajaxSave.hide();
|
||||
$ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { DeviceHeldLocation: $deviceHeldLocation.val() };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.UpdateDeviceHeldLocation(Model.Job.Id, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update device held location: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update device held location: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
$deviceHeldLocation
|
||||
.watermark('Unknown')
|
||||
.focus(function () { $deviceHeldLocation.select() })
|
||||
.keydown(function (e) {
|
||||
$ajaxSave.show();
|
||||
if (e.which == 13) {
|
||||
$(this).blur();
|
||||
}
|
||||
}).blur(function () {
|
||||
$ajaxSave.hide();
|
||||
})
|
||||
.change(function () {
|
||||
$ajaxSave.hide();
|
||||
$ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
|
||||
var data = { DeviceHeldLocation: $deviceHeldLocation.val() };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.Job.UpdateDeviceHeldLocation(Model.Job.Id, null))',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
|
||||
} else {
|
||||
$ajaxLoading.hide();
|
||||
alert('Unable to update device held location: ' + d);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to update device held location: ' + textStatus);
|
||||
$ajaxLoading.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -318,8 +353,12 @@
|
||||
{
|
||||
<td id="Job_Show_User">
|
||||
<div>
|
||||
<h2 id="Job_Show_User_DisplayName" title="Display Name">@Html.ActionLink(Model.Job.User.DisplayName, MVC.User.Show(Model.Job.UserId))</h2>
|
||||
<div id="Job_Show_User_Id" title="Id">@Model.Job.UserId <span id="Job_Show_User_Type" title="Type">[@(Model.Job.User.Type)]</span></div>
|
||||
<h2 id="Job_Show_User_DisplayName" title="Display Name">@if (Authorization.Has(Claims.User.Show))
|
||||
{@Html.ActionLink(Model.Job.User.DisplayName, MVC.User.Show(Model.Job.UserId))}
|
||||
else
|
||||
{@Model.Job.User.DisplayName}
|
||||
</h2>
|
||||
<div id="Job_Show_User_Id" title="Id">@Model.Job.UserId</div>
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Job.User.PhoneNumber))
|
||||
{<div id="Job_Show_User_PhoneNumber" title="Phone Number">Phone: @Model.Job.User.PhoneNumber</div>}
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Job.User.EmailAddress))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/List.cshtml")]
|
||||
public partial class List : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ListModel>
|
||||
public partial class List : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ListModel>
|
||||
{
|
||||
public List()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@model Disco.Web.Models.Job.LogWarrantyModel
|
||||
@{
|
||||
Authorization.Require(Claims.Job.Actions.LogWarranty);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/LogWarranty.cshtml")]
|
||||
public partial class LogWarranty : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.LogWarrantyModel>
|
||||
public partial class LogWarranty : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.LogWarrantyModel>
|
||||
{
|
||||
public LogWarranty()
|
||||
{
|
||||
@@ -43,6 +45,8 @@ namespace Disco.Web.Views.Job
|
||||
|
||||
#line 2 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.Actions.LogWarranty);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
||||
|
||||
|
||||
@@ -51,7 +55,7 @@ namespace Disco.Web.Views.Job
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 7 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
{
|
||||
|
||||
@@ -59,42 +63,42 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 9 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.ValidationSummary(true));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 9 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 10 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.HiddenFor(m => m.JobId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 10 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 11 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.JobId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 11 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -124,7 +128,7 @@ WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>In
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 19 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.JobId);
|
||||
|
||||
|
||||
@@ -136,7 +140,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 26 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.Job.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -148,7 +152,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 33 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Manufacturer);
|
||||
|
||||
|
||||
@@ -157,7 +161,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 33 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Model);
|
||||
|
||||
|
||||
@@ -169,7 +173,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 40 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.TechUser.DisplayName);
|
||||
|
||||
|
||||
@@ -182,7 +186,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">\r\n Email Address: ");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 42 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.TechUser.EmailAddress);
|
||||
|
||||
|
||||
@@ -191,7 +195,7 @@ WriteLiteral(">\r\n Email Address: ");
|
||||
WriteLiteral("<br />\r\n Phone Number: ");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 43 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Model.TechUser.PhoneNumber);
|
||||
|
||||
|
||||
@@ -207,7 +211,7 @@ WriteLiteral(">Repair Address:\r\n </th>\r\n <td>\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 51 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.OrganisationAddressId, Model.OrganisationAddresses.ToSelectListItems(Model.OrganisationAddressId, (Model.OrganisationAddress == null))));
|
||||
|
||||
|
||||
@@ -218,7 +222,7 @@ WriteLiteral("<br />\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 52 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.OrganisationAddressId));
|
||||
|
||||
|
||||
@@ -232,14 +236,14 @@ WriteLiteral(" style=\"display: none\"");
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 2075), Tuple.Create("\"", 2134)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 2141), Tuple.Create("\"", 2200)
|
||||
|
||||
#line 52 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2081), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Status.loading_gif
|
||||
#line 54 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2147), Tuple.Create<System.Object, System.Int32>(Links.ClientSource.Style.Images.Status.loading_gif
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2081), false)
|
||||
, 2147), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" alt=\"Loading\"");
|
||||
@@ -255,13 +259,13 @@ WriteLiteral(" id=\"organisationAddressDetails\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 58 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 56 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 58 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
|
||||
var oa = Model.OrganisationAddress;
|
||||
if (oa != null)
|
||||
@@ -273,7 +277,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 62 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(oa.Address);
|
||||
|
||||
|
||||
@@ -286,7 +290,7 @@ WriteLiteral(" <br />\r\n");
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 64 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(oa.Suburb);
|
||||
|
||||
|
||||
@@ -295,7 +299,7 @@ WriteLiteral(" <span>");
|
||||
WriteLiteral(", ");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 64 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(oa.Postcode);
|
||||
|
||||
|
||||
@@ -308,7 +312,7 @@ WriteLiteral(" <br />\r\n");
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 64 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 66 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(oa.State);
|
||||
|
||||
|
||||
@@ -317,7 +321,7 @@ WriteLiteral(" <span>");
|
||||
WriteLiteral(", ");
|
||||
|
||||
|
||||
#line 64 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 66 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(oa.Country);
|
||||
|
||||
|
||||
@@ -326,7 +330,7 @@ WriteLiteral(", ");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 67 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -339,7 +343,7 @@ WriteLiteral("\r\n </div>\r\n </td>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 74 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 76 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.DropDownListFor(model => model.WarrantyProviderId, Model.WarrantyProviders.ToSelectListItems(Model.WarrantyProviderId, true)));
|
||||
|
||||
|
||||
@@ -350,7 +354,7 @@ WriteLiteral("<br />\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 75 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 77 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.WarrantyProviderId));
|
||||
|
||||
|
||||
@@ -372,7 +376,7 @@ WriteLiteral(">\r\n <h2>Fault Description</h2>\r\n <table>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 85 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 87 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.EditorFor(model => model.FaultDescription));
|
||||
|
||||
|
||||
@@ -383,7 +387,7 @@ WriteLiteral("<br />\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 86 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 88 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.ValidationMessageFor(m => m.FaultDescription));
|
||||
|
||||
|
||||
@@ -392,7 +396,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 91 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 93 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
if (Model.WarrantyProvider != null && Model.WarrantyProviderSubmitJobViewType != null)
|
||||
{
|
||||
|
||||
@@ -408,7 +412,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 94 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 96 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Html.PartialCompiled(Model.WarrantyProviderSubmitJobViewType, Model.WarrantyProviderSubmitJobModel));
|
||||
|
||||
|
||||
@@ -417,7 +421,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 98 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -438,7 +442,7 @@ WriteLiteral(" value=\"Preview Warranty Claim\"");
|
||||
WriteLiteral(" />\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 100 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 102 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +469,7 @@ WriteLiteral(@">
|
||||
window.location.href = '");
|
||||
|
||||
|
||||
#line 115 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
#line 117 "..\..\Views\Job\LogWarranty.cshtml"
|
||||
Write(Url.Action(MVC.Job.LogWarranty(Model.JobId, null, null)));
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@model Disco.Web.Models.Job.LogWarrantyModel
|
||||
@{
|
||||
Authorization.Require(Claims.Job.Actions.LogWarranty);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
||||
}
|
||||
@using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/LogWarrantyDisclose.cshtml")]
|
||||
public partial class LogWarrantyDisclose : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.LogWarrantyModel>
|
||||
public partial class LogWarrantyDisclose : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.LogWarrantyModel>
|
||||
{
|
||||
public LogWarrantyDisclose()
|
||||
{
|
||||
@@ -43,6 +45,8 @@ namespace Disco.Web.Views.Job
|
||||
|
||||
#line 2 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.Actions.LogWarranty);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty");
|
||||
|
||||
|
||||
@@ -51,7 +55,7 @@ namespace Disco.Web.Views.Job
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 5 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 7 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
using (Html.BeginForm(MVC.Job.LogWarranty(), FormMethod.Post))
|
||||
{
|
||||
|
||||
@@ -59,84 +63,84 @@ WriteLiteral("\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 9 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.ValidationSummary(true));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 9 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 10 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.HiddenFor(m => m.JobId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 8 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 10 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 11 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.HiddenFor(m => m.OrganisationAddressId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 11 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 12 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.HiddenFor(m => m.WarrantyProviderId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 12 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 13 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.HiddenFor(m => m.FaultDescription));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 13 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 14 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Html.HiddenFor(m => m.WarrantyProviderPropertiesJson));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 14 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
|
||||
@@ -166,7 +170,7 @@ WriteLiteral(">\r\n <table>\r\n <tr>\r\n <th>\r
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 23 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.JobId);
|
||||
|
||||
|
||||
@@ -179,7 +183,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 31 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.Job.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -192,7 +196,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 39 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Manufacturer);
|
||||
|
||||
|
||||
@@ -201,7 +205,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 39 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Model);
|
||||
|
||||
|
||||
@@ -214,7 +218,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 47 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.TechUser.DisplayName);
|
||||
|
||||
|
||||
@@ -227,7 +231,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">\r\n Email Address: ");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 49 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.TechUser.EmailAddress);
|
||||
|
||||
|
||||
@@ -236,7 +240,7 @@ WriteLiteral(">\r\n Email Address: ");
|
||||
WriteLiteral("<br />\r\n Phone Number: ");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 50 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.TechUser.PhoneNumber);
|
||||
|
||||
|
||||
@@ -257,7 +261,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 60 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.Name);
|
||||
|
||||
|
||||
@@ -270,7 +274,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">\r\n <span>");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 62 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.Address);
|
||||
|
||||
|
||||
@@ -279,7 +283,7 @@ WriteLiteral(">\r\n <span>");
|
||||
WriteLiteral("</span><br />\r\n <span>");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 63 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.Suburb);
|
||||
|
||||
|
||||
@@ -288,7 +292,7 @@ WriteLiteral("</span><br />\r\n <span>");
|
||||
WriteLiteral(", ");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 63 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.Postcode);
|
||||
|
||||
|
||||
@@ -297,7 +301,7 @@ WriteLiteral(", ");
|
||||
WriteLiteral("</span><br />\r\n <span>");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 64 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.State);
|
||||
|
||||
|
||||
@@ -306,7 +310,7 @@ WriteLiteral("</span><br />\r\n <span>");
|
||||
WriteLiteral(", ");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 64 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.OrganisationAddress.Country);
|
||||
|
||||
|
||||
@@ -319,7 +323,7 @@ WriteLiteral("</span>\r\n </div>\r\n <
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 72 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 74 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.WarrantyProvider.Name);
|
||||
|
||||
|
||||
@@ -328,7 +332,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" (");
|
||||
|
||||
|
||||
#line 72 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 74 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.WarrantyProvider.Id);
|
||||
|
||||
|
||||
@@ -337,7 +341,7 @@ WriteLiteral(" (");
|
||||
WriteLiteral(") ");
|
||||
|
||||
|
||||
#line 72 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 74 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.WarrantyProvider.PluginManifest.Version.ToString(3));
|
||||
|
||||
|
||||
@@ -350,7 +354,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 82 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(Model.FaultDescription.ToMultilineString());
|
||||
|
||||
|
||||
@@ -365,13 +369,13 @@ WriteLiteral(" id=\"warrantyDisclosedInformation\"");
|
||||
WriteLiteral(">\r\n <table>\r\n");
|
||||
|
||||
|
||||
#line 90 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 92 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 90 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 92 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
foreach (var dp in Model.DiscloseProperties)
|
||||
{
|
||||
|
||||
@@ -381,7 +385,7 @@ WriteLiteral(">\r\n <table>\r\n");
|
||||
WriteLiteral(" <tr>\r\n <th>");
|
||||
|
||||
|
||||
#line 93 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 95 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(dp.Key);
|
||||
|
||||
|
||||
@@ -391,7 +395,7 @@ WriteLiteral(":\r\n </th>\r\n
|
||||
" <td>");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 97 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
Write(dp.Value);
|
||||
|
||||
|
||||
@@ -401,7 +405,7 @@ WriteLiteral("\r\n </td>\r\n
|
||||
"> \r\n");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 100 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -425,7 +429,7 @@ WriteLiteral(" value=\"Submit Warranty Claim\"");
|
||||
WriteLiteral(" />\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 108 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
#line 110 "..\..\Views\Job\LogWarrantyDisclose.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@model Disco.Web.Models.Job.LogWarrantyModel
|
||||
@{
|
||||
Authorization.Require(Claims.Job.Actions.LogWarranty);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty Error");
|
||||
}
|
||||
<div class="form" style="width: 650px">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/LogWarrantyError.cshtml")]
|
||||
public partial class LogWarrantyError : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.LogWarrantyModel>
|
||||
public partial class LogWarrantyError : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.LogWarrantyModel>
|
||||
{
|
||||
public LogWarrantyError()
|
||||
{
|
||||
@@ -43,6 +45,8 @@ namespace Disco.Web.Views.Job
|
||||
|
||||
#line 2 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.Actions.LogWarranty);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id), MVC.Job.Show(Model.Job.Id), "Log Warranty Error");
|
||||
|
||||
|
||||
@@ -58,7 +62,7 @@ WriteLiteral(">\r\n <h2>\r\n Submission Error</h2>\r\n <table>\r\n
|
||||
" <td>\r\n <div>\r\n <strong>");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 14 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.Message);
|
||||
|
||||
|
||||
@@ -81,7 +85,7 @@ WriteLiteral(" style=\"display: none\"");
|
||||
WriteLiteral(">\r\n <br />\r\n <strong>Error Type: </strong>");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 19 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.GetType().Name);
|
||||
|
||||
|
||||
@@ -97,7 +101,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 23 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.StackTrace.ToMultilineString());
|
||||
|
||||
|
||||
@@ -106,13 +110,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 25 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 25 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
if (Model.Error.InnerException != null)
|
||||
{
|
||||
|
||||
@@ -125,7 +129,7 @@ WriteLiteral(" <div>\r\n <stro
|
||||
"n:</strong> ");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 29 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.InnerException.Message);
|
||||
|
||||
|
||||
@@ -134,7 +138,7 @@ WriteLiteral(" <div>\r\n <stro
|
||||
WriteLiteral("<br />\r\n <strong>Error Type:</strong> ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 30 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.GetType().Name);
|
||||
|
||||
|
||||
@@ -150,7 +154,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 33 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Error.InnerException.StackTrace);
|
||||
|
||||
|
||||
@@ -159,7 +163,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 34 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 36 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +200,7 @@ WriteLiteral(">\r\n <h2>\r\n Warranty Submission Details</h2>\r\n <
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 59 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.JobId);
|
||||
|
||||
|
||||
@@ -208,7 +212,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 67 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Job.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -220,7 +224,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 73 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 75 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Manufacturer);
|
||||
|
||||
|
||||
@@ -229,7 +233,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 73 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 75 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.Job.Device.DeviceModel.Model);
|
||||
|
||||
|
||||
@@ -241,7 +245,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 81 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 83 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.TechUser.DisplayName);
|
||||
|
||||
|
||||
@@ -254,7 +258,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">\r\n Email Address: ");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 85 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.TechUser.EmailAddress);
|
||||
|
||||
|
||||
@@ -263,7 +267,7 @@ WriteLiteral(">\r\n Email Address: ");
|
||||
WriteLiteral("<br />\r\n Phone Number: ");
|
||||
|
||||
|
||||
#line 84 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 86 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.TechUser.PhoneNumber);
|
||||
|
||||
|
||||
@@ -284,7 +288,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 94 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 96 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.Name);
|
||||
|
||||
|
||||
@@ -297,7 +301,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">\r\n <span>");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 98 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.Address);
|
||||
|
||||
|
||||
@@ -306,7 +310,7 @@ WriteLiteral(">\r\n <span>");
|
||||
WriteLiteral("</span><br />\r\n <span>");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 99 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.Suburb);
|
||||
|
||||
|
||||
@@ -315,7 +319,7 @@ WriteLiteral("</span><br />\r\n <span>");
|
||||
WriteLiteral(", ");
|
||||
|
||||
|
||||
#line 97 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 99 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.Postcode);
|
||||
|
||||
|
||||
@@ -324,7 +328,7 @@ WriteLiteral(", ");
|
||||
WriteLiteral("</span><br />\r\n <span>");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 100 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.State);
|
||||
|
||||
|
||||
@@ -333,7 +337,7 @@ WriteLiteral("</span><br />\r\n <span>");
|
||||
WriteLiteral(", ");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 100 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.OrganisationAddress.Country);
|
||||
|
||||
|
||||
@@ -346,7 +350,7 @@ WriteLiteral("</span>\r\n </div>\r\n </div>\r\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 108 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 110 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.WarrantyProvider.Name);
|
||||
|
||||
|
||||
@@ -355,7 +359,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" (");
|
||||
|
||||
|
||||
#line 108 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 110 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.WarrantyProvider.Id);
|
||||
|
||||
|
||||
@@ -364,7 +368,7 @@ WriteLiteral(" (");
|
||||
WriteLiteral(") ");
|
||||
|
||||
|
||||
#line 108 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 110 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.WarrantyProvider.PluginManifest.Version.ToString(3));
|
||||
|
||||
|
||||
@@ -376,7 +380,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n <tr>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 116 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 118 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Model.FaultDescription.ToMultilineString());
|
||||
|
||||
|
||||
@@ -391,7 +395,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 122 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 124 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Html.ActionLinkButton("Try Again", MVC.Job.LogWarranty(Model.JobId, null, null)));
|
||||
|
||||
|
||||
@@ -402,7 +406,7 @@ WriteLiteral("\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 123 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
#line 125 "..\..\Views\Job\LogWarrantyError.cshtml"
|
||||
Write(Html.ActionLinkButton("Return to Job", MVC.Job.Show(Model.JobId)));
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
@model Disco.Web.Models.Job.ShowModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id.ToString()));
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
|
||||
if (Authorization.Has(Claims.Job.Actions.AddAttachments))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
}
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
||||
|
||||
Authorization.Require(Claims.Job.Show);
|
||||
}
|
||||
<div id="Job_Show">
|
||||
<div id="Job_Show_Status">
|
||||
@@ -18,39 +25,57 @@
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $tabs = $('#jobDetailTabs');
|
||||
$tabs.tabs({
|
||||
activate: function (event, ui) {
|
||||
window.setTimeout(function () {
|
||||
var $window = $(window);
|
||||
var tabHeight = $tabs.height();
|
||||
var tabOffset = $tabs.offset();
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var windowHeight = $window.height();
|
||||
if ($tabs.children().length > 1) {
|
||||
$tabs.tabs({
|
||||
activate: function (event, ui) {
|
||||
window.setTimeout(function () {
|
||||
var $window = $(window);
|
||||
var tabHeight = $tabs.height();
|
||||
var tabOffset = $tabs.offset();
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var windowHeight = $window.height();
|
||||
|
||||
var tabTopNotShown = windowScrollTop - tabOffset.top;
|
||||
if (tabTopNotShown > 0) {
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
} else {
|
||||
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
|
||||
if (tabBottomNotShown > 0) {
|
||||
if (tabHeight > windowHeight)
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
else
|
||||
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
|
||||
var tabTopNotShown = windowScrollTop - tabOffset.top;
|
||||
if (tabTopNotShown > 0) {
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
} else {
|
||||
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
|
||||
if (tabBottomNotShown > 0) {
|
||||
if (tabHeight > windowHeight)
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
else
|
||||
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$tabs.hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div id="jobDetailTabs">
|
||||
<ul id="jobDetailTabItems">
|
||||
<li><a href="#jobDetailTab-Resources">Log and Attachments</a></li>
|
||||
@if (Authorization.HasAll(Claims.Job.ShowLogs, Claims.Job.ShowAttachments))
|
||||
{
|
||||
<li><a href="#jobDetailTab-Resources">Log and Attachments</a></li>
|
||||
}
|
||||
else if (Authorization.Has(Claims.Job.ShowLogs))
|
||||
{
|
||||
<li><a href="#jobDetailTab-Resources">Log</a></li>
|
||||
}
|
||||
else if (Authorization.Has(Claims.Job.ShowLogs))
|
||||
{
|
||||
<li><a href="#jobDetailTab-Resources">Attachments</a></li>
|
||||
}
|
||||
</ul>
|
||||
<div id="jobDetailTab-Resources" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Resources, Model)
|
||||
</div>
|
||||
@if (Authorization.HasAny(Claims.Job.ShowLogs, Claims.Job.ShowAttachments))
|
||||
{
|
||||
<div id="jobDetailTab-Resources" class="jobPart">
|
||||
@Html.Partial(MVC.Job.Views.JobParts.Resources, Model)
|
||||
</div>
|
||||
}
|
||||
@Html.Partial(MVC.Job.Views.JobParts.JobMetaAdditions, Model)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/Show.cshtml")]
|
||||
public partial class Show : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.ShowModel>
|
||||
{
|
||||
public Show()
|
||||
{
|
||||
@@ -44,9 +46,16 @@ namespace Disco.Web.Views.Job
|
||||
#line 2 "..\..\Views\Job\Show.cshtml"
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Jobs", MVC.Job.Index(), string.Format("Job: {0}", Model.Job.Id.ToString()));
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
|
||||
if (Authorization.Has(Claims.Job.Actions.AddAttachments))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
}
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQueryUI-TimePicker");
|
||||
|
||||
Authorization.Require(Claims.Job.Show);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -61,35 +70,35 @@ WriteLiteral(" id=\"Job_Show_Status\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\Show.cshtml"
|
||||
#line 16 "..\..\Views\Job\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\Job\Show.cshtml"
|
||||
#line 16 "..\..\Views\Job\Show.cshtml"
|
||||
var jobStatusInfo = Model.Job.Status();
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 420), Tuple.Create("\"", 464)
|
||||
, Tuple.Create(Tuple.Create("", 428), Tuple.Create("icon", 428), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 432), Tuple.Create("JobStatus", 433), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 552), Tuple.Create("\"", 596)
|
||||
, Tuple.Create(Tuple.Create("", 560), Tuple.Create("icon", 560), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 564), Tuple.Create("JobStatus", 565), true)
|
||||
|
||||
#line 10 "..\..\Views\Job\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 442), Tuple.Create<System.Object, System.Int32>(jobStatusInfo.Item1
|
||||
#line 17 "..\..\Views\Job\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 574), Tuple.Create<System.Object, System.Int32>(jobStatusInfo.Item1
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 442), false)
|
||||
, 574), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Job\Show.cshtml"
|
||||
#line 17 "..\..\Views\Job\Show.cshtml"
|
||||
Write(jobStatusInfo.Item2);
|
||||
|
||||
|
||||
@@ -105,7 +114,7 @@ WriteLiteral(">\r\n $(function () {\r\n $(\'#Job_Show_
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\Show.cshtml"
|
||||
#line 24 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts._Subject, Model));
|
||||
|
||||
|
||||
@@ -115,36 +124,26 @@ WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var $tabs = $('#jobDetailTabs');
|
||||
$tabs.tabs({
|
||||
activate: function (event, ui) {
|
||||
window.setTimeout(function () {
|
||||
var $window = $(window);
|
||||
var tabHeight = $tabs.height();
|
||||
var tabOffset = $tabs.offset();
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var windowHeight = $window.height();
|
||||
|
||||
var tabTopNotShown = windowScrollTop - tabOffset.top;
|
||||
if (tabTopNotShown > 0) {
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
} else {
|
||||
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
|
||||
if (tabBottomNotShown > 0) {
|
||||
if (tabHeight > windowHeight)
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
else
|
||||
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div");
|
||||
WriteLiteral(">\r\n $(function () {\r\n var $tabs = $(\'#jobDetailTabs\');\r\n " +
|
||||
" if ($tabs.children().length > 1) {\r\n $tabs.tabs({\r\n " +
|
||||
" activate: function (event, ui) {\r\n window.setT" +
|
||||
"imeout(function () {\r\n var $window = $(window);\r\n " +
|
||||
" var tabHeight = $tabs.height();\r\n " +
|
||||
" var tabOffset = $tabs.offset();\r\n var windowScro" +
|
||||
"llTop = $window.scrollTop();\r\n var windowHeight = $wi" +
|
||||
"ndow.height();\r\n\r\n var tabTopNotShown = windowScrollT" +
|
||||
"op - tabOffset.top;\r\n if (tabTopNotShown > 0) {\r\n " +
|
||||
" $(\'html\').animate({ scrollTop: tabOffset.top }, 125)" +
|
||||
";\r\n } else {\r\n var tab" +
|
||||
"BottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)" +
|
||||
") * -1;\r\n if (tabBottomNotShown > 0) {\r\n " +
|
||||
" if (tabHeight > windowHeight)\r\n " +
|
||||
" $(\'html\').animate({ scrollTop: tabOffset.top }, 125);\r\n " +
|
||||
" else\r\n $(\'ht" +
|
||||
"ml\').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);\r\n " +
|
||||
" }\r\n }\r\n " +
|
||||
" }, 1);\r\n }\r\n });\r\n } else {\r\n " +
|
||||
" $tabs.hide();\r\n }\r\n });\r\n </script>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTabs\"");
|
||||
|
||||
@@ -152,11 +151,82 @@ WriteLiteral(">\r\n <ul");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTabItems\"");
|
||||
|
||||
WriteLiteral(">\r\n <li><a");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\Job\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 60 "..\..\Views\Job\Show.cshtml"
|
||||
if (Authorization.HasAll(Claims.Job.ShowLogs, Claims.Job.ShowAttachments))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li><a");
|
||||
|
||||
WriteLiteral(" href=\"#jobDetailTab-Resources\"");
|
||||
|
||||
WriteLiteral(">Log and Attachments</a></li>\r\n </ul>\r\n <div");
|
||||
WriteLiteral(">Log and Attachments</a></li>\r\n");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
else if (Authorization.Has(Claims.Job.ShowLogs))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li><a");
|
||||
|
||||
WriteLiteral(" href=\"#jobDetailTab-Resources\"");
|
||||
|
||||
WriteLiteral(">Log</a></li>\r\n");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
else if (Authorization.Has(Claims.Job.ShowLogs))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li><a");
|
||||
|
||||
WriteLiteral(" href=\"#jobDetailTab-Resources\"");
|
||||
|
||||
WriteLiteral(">Attachments</a></li>\r\n");
|
||||
|
||||
|
||||
#line 71 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n");
|
||||
|
||||
|
||||
#line 73 "..\..\Views\Job\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 73 "..\..\Views\Job\Show.cshtml"
|
||||
if (Authorization.HasAny(Claims.Job.ShowLogs, Claims.Job.ShowAttachments))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"jobDetailTab-Resources\"");
|
||||
|
||||
@@ -164,27 +234,34 @@ WriteLiteral(" class=\"jobPart\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Resources, Model));
|
||||
#line 76 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.Resources, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Job\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\Job\Show.cshtml"
|
||||
#line 79 "..\..\Views\Job\Show.cshtml"
|
||||
Write(Html.Partial(MVC.Job.Views.JobParts.JobMetaAdditions, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n</div>");
|
||||
WriteLiteral("\r\n </div>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
@model Disco.Web.Models.Job.WarrantyProviderJobDetailsModel
|
||||
@{ Layout = null;
|
||||
|
||||
Authorization.Require(Claims.Job.Properties.WarrantyProperties.ProviderDetails);
|
||||
|
||||
if (Model.JobDetailsException != null)
|
||||
{
|
||||
<h3>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Job
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/WarrantyProviderJobDetails.cshtml")]
|
||||
public partial class WarrantyProviderJobDetails : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.WarrantyProviderJobDetailsModel>
|
||||
public partial class WarrantyProviderJobDetails : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.WarrantyProviderJobDetailsModel>
|
||||
{
|
||||
public WarrantyProviderJobDetails()
|
||||
{
|
||||
@@ -44,6 +46,8 @@ namespace Disco.Web.Views.Job
|
||||
#line 2 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Layout = null;
|
||||
|
||||
Authorization.Require(Claims.Job.Properties.WarrantyProperties.ProviderDetails);
|
||||
|
||||
if (Model.JobDetailsException != null)
|
||||
{
|
||||
|
||||
@@ -55,7 +59,7 @@ WriteLiteral(" <h3>\r\n Error:</h3>\r\n");
|
||||
WriteLiteral(" <div>\r\n <strong>");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 11 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.Message);
|
||||
|
||||
|
||||
@@ -82,7 +86,7 @@ WriteLiteral(" style=\"display: none\"");
|
||||
WriteLiteral(">\r\n <br />\r\n <strong>Error Type: </strong>");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 16 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.GetType().Name);
|
||||
|
||||
|
||||
@@ -97,7 +101,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 20 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.StackTrace.ToMultilineString());
|
||||
|
||||
|
||||
@@ -106,13 +110,13 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 22 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 20 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 22 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
if (Model.JobDetailsException.InnerException != null)
|
||||
{
|
||||
|
||||
@@ -124,7 +128,7 @@ WriteLiteral(" <hr />\r\n");
|
||||
WriteLiteral(" <div>\r\n <strong>Inner Exception:</strong> ");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 26 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.InnerException.Message);
|
||||
|
||||
|
||||
@@ -133,7 +137,7 @@ WriteLiteral(" <div>\r\n <strong>Inner Exception:</str
|
||||
WriteLiteral("<br />\r\n <strong>Error Type:</strong> ");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 27 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.GetType().Name);
|
||||
|
||||
|
||||
@@ -148,7 +152,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 30 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsException.InnerException.StackTrace);
|
||||
|
||||
|
||||
@@ -157,7 +161,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 33 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +183,7 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 43 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -190,14 +194,14 @@ WriteLiteral(@">
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 48 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Html.PartialCompiled(Model.ViewType, Model.ViewModel));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 48 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
@@ -213,7 +217,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 52 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
Write(Model.JobDetailsNotSupportedMessage);
|
||||
|
||||
|
||||
@@ -222,7 +226,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
#line 53 "..\..\Views\Job\WarrantyProviderJobDetails.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
@model Disco.Web.Models.Job.CreateModel
|
||||
@{
|
||||
Authorization.Require(Claims.Job.Actions.Create);
|
||||
}
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -19,7 +22,7 @@
|
||||
{
|
||||
<span><strong>Serial Number:</strong> @Model.Device.SerialNumber</span><br />
|
||||
<span><strong>Name:</strong> @Model.Device.ComputerName</span><br />
|
||||
<span><strong>Model:</strong> @Model.Device.DeviceModel.ToString()</span><br />
|
||||
<span><strong>Model:</strong> @Model.Device.DeviceModel.ToString()</span>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@@ -33,8 +36,7 @@
|
||||
else
|
||||
{
|
||||
<span><strong>Id:</strong> @Model.User.Id</span><br />
|
||||
<span><strong>Name:</strong> @Model.User.DisplayName</span><br />
|
||||
<span><strong>Type:</strong> @Model.User.Type</span>
|
||||
<span><strong>Name:</strong> @Model.User.DisplayName</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,28 +28,38 @@ namespace Disco.Web.Views.Job
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Job/_CreateSubject.cshtml")]
|
||||
public partial class CreateSubject : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.CreateModel>
|
||||
public partial class CreateSubject : Disco.Services.Web.WebViewPage<Disco.Web.Models.Job.CreateModel>
|
||||
{
|
||||
public CreateSubject()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<table>\r\n <tr>\r\n <td>\r\n <h2>Device</h2>\r\n </td>\r\n");
|
||||
|
||||
#line 2 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Job.Actions.Create);
|
||||
|
||||
|
||||
#line 7 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<table>\r\n <tr>\r\n <td>\r\n <h2>Device</h2>\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 10 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
if (Model.Device != null)
|
||||
{
|
||||
|
||||
@@ -66,20 +76,20 @@ WriteLiteral(" class=\"modelImage\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 260), Tuple.Create("\"", 370)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 322), Tuple.Create("\"", 432)
|
||||
|
||||
#line 10 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 266), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))
|
||||
#line 13 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 328), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(Model.Device.DeviceModelId, Model.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 266), false)
|
||||
, 328), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 15 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -92,13 +102,13 @@ WriteLiteral(" style=\"width: 50%\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 17 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 14 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 17 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
if (Model.Device == null)
|
||||
{
|
||||
|
||||
@@ -112,7 +122,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Device referenced to this Job</span>\r\n");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 20 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -123,7 +133,7 @@ WriteLiteral(">No Device referenced to this Job</span>\r\n");
|
||||
WriteLiteral(" <span><strong>Serial Number:</strong> ");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 23 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -136,7 +146,7 @@ WriteLiteral("<br />\r\n");
|
||||
WriteLiteral(" <span><strong>Name:</strong> ");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 24 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.Device.ComputerName);
|
||||
|
||||
|
||||
@@ -149,18 +159,16 @@ WriteLiteral("<br />\r\n");
|
||||
WriteLiteral(" <span><strong>Model:</strong> ");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 25 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 26 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -174,13 +182,13 @@ WriteLiteral(" style=\"width: 50%\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 32 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 29 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 32 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
if (Model.User == null)
|
||||
{
|
||||
|
||||
@@ -194,7 +202,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No User referenced to this Job</span>\r\n");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 35 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -205,7 +213,7 @@ WriteLiteral(">No User referenced to this Job</span>\r\n");
|
||||
WriteLiteral(" <span><strong>Id:</strong> ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 38 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.User.Id);
|
||||
|
||||
|
||||
@@ -218,29 +226,16 @@ WriteLiteral("<br />\r\n");
|
||||
WriteLiteral(" <span><strong>Name:</strong> ");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 39 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.User.DisplayName);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral("<br />\r\n");
|
||||
|
||||
WriteLiteral(" <span><strong>Type:</strong> ");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
Write(Model.User.Type);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
#line 40 "..\..\Views\Job\_CreateSubject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,6 +28,8 @@ namespace Disco.Web.Views.Job
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
using Disco.Web.Extensions;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Query: '<span style="font-weight: bold;">@(Model.FriendlyTerm != null ? Model.FriendlyTerm : Model.Term)</span>'</h2>
|
||||
@if (Model.Success)
|
||||
{
|
||||
if (Model.Jobs != null)
|
||||
if (Model.Jobs != null && Authorization.Has(Claims.Job.Search))
|
||||
{
|
||||
<h2>
|
||||
Jobs</h2>
|
||||
@@ -14,7 +14,7 @@
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, @Model.Jobs)
|
||||
</div>
|
||||
}
|
||||
if (Model.Devices != null)
|
||||
if (Model.Devices != null && Authorization.Has(Claims.Device.Search))
|
||||
{
|
||||
<h2>
|
||||
Devices</h2>
|
||||
@@ -22,7 +22,7 @@
|
||||
@Html.Partial(MVC.Device.Views._DeviceTable, @Model.Devices)
|
||||
</div>
|
||||
}
|
||||
if (Model.Users != null)
|
||||
if (Model.Users != null && Authorization.Has(Claims.User.Search))
|
||||
{
|
||||
<h2>
|
||||
Users</h2>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Search
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Search/Query.cshtml")]
|
||||
public partial class Query : System.Web.Mvc.WebViewPage<Disco.Web.Models.Search.QueryModel>
|
||||
public partial class Query : Disco.Services.Web.WebViewPage<Disco.Web.Models.Search.QueryModel>
|
||||
{
|
||||
public Query()
|
||||
{
|
||||
@@ -67,7 +69,7 @@ WriteLiteral("</span>\'</h2>\r\n");
|
||||
#line 7 "..\..\Views\Search\Query.cshtml"
|
||||
if (Model.Success)
|
||||
{
|
||||
if (Model.Jobs != null)
|
||||
if (Model.Jobs != null && Authorization.Has(Claims.Job.Search))
|
||||
{
|
||||
|
||||
|
||||
@@ -91,7 +93,7 @@ WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
#line 16 "..\..\Views\Search\Query.cshtml"
|
||||
}
|
||||
if (Model.Devices != null)
|
||||
if (Model.Devices != null && Authorization.Has(Claims.Device.Search))
|
||||
{
|
||||
|
||||
|
||||
@@ -115,7 +117,7 @@ WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
#line 24 "..\..\Views\Search\Query.cshtml"
|
||||
}
|
||||
if (Model.Users != null)
|
||||
if (Model.Users != null && Authorization.Has(Claims.User.Search))
|
||||
{
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Shared
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Shared/Error.cshtml")]
|
||||
public partial class Error : System.Web.Mvc.WebViewPage<System.Web.Mvc.HandleErrorInfo>
|
||||
public partial class Error : Disco.Services.Web.WebViewPage<System.Web.Mvc.HandleErrorInfo>
|
||||
{
|
||||
public Error()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Shared
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Shared/_DialogLayout.cshtml")]
|
||||
public partial class DialogLayout : System.Web.Mvc.WebViewPage<dynamic>
|
||||
public partial class DialogLayout : Disco.Services.Web.WebViewPage<dynamic>
|
||||
{
|
||||
public DialogLayout()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Shared
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Shared/_EmptyLayout.cshtml")]
|
||||
public partial class EmptyLayout : System.Web.Mvc.WebViewPage<dynamic>
|
||||
public partial class EmptyLayout : Disco.Services.Web.WebViewPage<dynamic>
|
||||
{
|
||||
public EmptyLayout()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Shared
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Shared/_JobTable.cshtml")]
|
||||
public partial class JobTable : System.Web.Mvc.WebViewPage<Disco.Models.BI.Job.JobTableModel>
|
||||
public partial class JobTable : Disco.Services.Web.WebViewPage<Disco.Models.BI.Job.JobTableModel>
|
||||
{
|
||||
public JobTable()
|
||||
{
|
||||
|
||||
@@ -9,36 +9,28 @@
|
||||
<thead>
|
||||
<tr>
|
||||
@if (Model.ShowId)
|
||||
{ <th class="id">
|
||||
Ref
|
||||
{ <th class="id">Ref
|
||||
</th> }
|
||||
@if (Model.ShowStatus)
|
||||
{ <th class="status">
|
||||
Status
|
||||
{ <th class="status">Status
|
||||
</th> }
|
||||
@if (Model.ShowDates)
|
||||
{ <th class="dates">
|
||||
Dates
|
||||
{ <th class="dates">Dates
|
||||
</th> }
|
||||
@if (Model.ShowType)
|
||||
{ <th class="type">
|
||||
Type
|
||||
{ <th class="type">Type
|
||||
</th> }
|
||||
@if (Model.ShowDevice)
|
||||
{<th class="device">
|
||||
Device
|
||||
{<th class="device">Device
|
||||
</th> }
|
||||
@if (Model.ShowUser)
|
||||
{ <th class="user">
|
||||
User
|
||||
{ <th class="user">User
|
||||
</th> }
|
||||
@if (Model.ShowTechnician)
|
||||
{ <th class="technician">
|
||||
Technician
|
||||
{ <th class="technician">Technician
|
||||
</th> }
|
||||
@if (Model.ShowLocation)
|
||||
{ <th class="location">
|
||||
Location
|
||||
{ <th class="location">Location
|
||||
</th> }
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -48,7 +40,14 @@
|
||||
<tr data-id="@(item.Id)" data-status="@(Model.ShowStatus ? item.StatusId : null)">
|
||||
@if (Model.ShowId)
|
||||
{ <td class="id">
|
||||
@Html.ActionLink(item.Id.ToString(), MVC.Job.Show(item.Id))
|
||||
@if (Authorization.Has(Claims.Job.Show))
|
||||
{
|
||||
@Html.ActionLink(item.Id.ToString(), MVC.Job.Show(item.Id))
|
||||
}
|
||||
else
|
||||
{
|
||||
@item.Id.ToString()
|
||||
}
|
||||
</td> }
|
||||
@if (Model.ShowStatus)
|
||||
{ <td class="status">
|
||||
@@ -68,7 +67,14 @@
|
||||
{ <td class="device">
|
||||
@if (item.DeviceSerialNumber != null)
|
||||
{
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
@Html.ActionLink(item.DeviceSerialNumber, MVC.Device.Show(item.DeviceSerialNumber), new { Title = item.DeviceModelDescription })
|
||||
}
|
||||
else
|
||||
{
|
||||
<span title="@item.DeviceModelDescription">@item.DeviceSerialNumber</span>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -79,7 +85,14 @@
|
||||
{<td class="user">
|
||||
@if (item.UserId != null)
|
||||
{
|
||||
if (Authorization.Has(Claims.User.Show))
|
||||
{
|
||||
@Html.ActionLink(string.Format("{0} ({1})", item.UserDisplayName, item.UserId), MVC.User.Show(item.UserId))
|
||||
}
|
||||
else
|
||||
{
|
||||
@(string.Format("{0} ({1})", item.UserDisplayName, item.UserId))
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Shared
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Shared/_JobTableRender.cshtml")]
|
||||
public partial class JobTableRender : System.Web.Mvc.WebViewPage<Disco.Models.BI.Job.JobTableModel>
|
||||
public partial class JobTableRender : Disco.Services.Web.WebViewPage<Disco.Models.BI.Job.JobTableModel>
|
||||
{
|
||||
public JobTableRender()
|
||||
{
|
||||
@@ -121,10 +123,10 @@ WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"id\"");
|
||||
|
||||
WriteLiteral(">\r\n Ref\r\n </th> ");
|
||||
WriteLiteral(">Ref\r\n </th> ");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 13 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +135,7 @@ WriteLiteral(">\r\n Ref\r\n </th> ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 15 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 14 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowStatus)
|
||||
{
|
||||
|
||||
@@ -143,10 +145,10 @@ WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"status\"");
|
||||
|
||||
WriteLiteral(">\r\n Status\r\n </th> ");
|
||||
WriteLiteral(">Status\r\n </th> ");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 16 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +157,7 @@ WriteLiteral(">\r\n Status\r\n </th> "
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 17 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowDates)
|
||||
{
|
||||
|
||||
@@ -165,7 +167,29 @@ WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"dates\"");
|
||||
|
||||
WriteLiteral(">\r\n Dates\r\n </th> ");
|
||||
WriteLiteral(">Dates\r\n </th> ");
|
||||
|
||||
|
||||
#line 19 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowType)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"type\"");
|
||||
|
||||
WriteLiteral(">Type\r\n </th> ");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
@@ -178,28 +202,6 @@ WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 23 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowType)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"type\"");
|
||||
|
||||
WriteLiteral(">\r\n Type\r\n </th> ");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowDevice)
|
||||
{
|
||||
|
||||
@@ -209,10 +211,10 @@ WriteLiteral("<th");
|
||||
|
||||
WriteLiteral(" class=\"device\"");
|
||||
|
||||
WriteLiteral(">\r\n Device\r\n </th> ");
|
||||
WriteLiteral(">Device\r\n </th> ");
|
||||
|
||||
|
||||
#line 30 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 25 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -221,7 +223,7 @@ WriteLiteral(">\r\n Device\r\n </th> "
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 26 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowUser)
|
||||
{
|
||||
|
||||
@@ -231,10 +233,10 @@ WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"user\"");
|
||||
|
||||
WriteLiteral(">\r\n User\r\n </th> ");
|
||||
WriteLiteral(">User\r\n </th> ");
|
||||
|
||||
|
||||
#line 34 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 28 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -243,7 +245,7 @@ WriteLiteral(">\r\n User\r\n </th> ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 29 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowTechnician)
|
||||
{
|
||||
|
||||
@@ -253,10 +255,10 @@ WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"technician\"");
|
||||
|
||||
WriteLiteral(">\r\n Technician\r\n </th> ");
|
||||
WriteLiteral(">Technician\r\n </th> ");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 31 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +267,7 @@ WriteLiteral(">\r\n Technician\r\n </t
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 32 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowLocation)
|
||||
{
|
||||
|
||||
@@ -275,10 +277,10 @@ WriteLiteral(" <th");
|
||||
|
||||
WriteLiteral(" class=\"location\"");
|
||||
|
||||
WriteLiteral(">\r\n Location\r\n </th> ");
|
||||
WriteLiteral(">Location\r\n </th> ");
|
||||
|
||||
|
||||
#line 42 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 34 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -287,13 +289,13 @@ WriteLiteral(">\r\n Location\r\n </th>
|
||||
WriteLiteral(" </tr>\r\n </thead>\r\n <tbody>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 38 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 38 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
foreach (var item in Model.Items)
|
||||
{
|
||||
|
||||
@@ -305,7 +307,7 @@ WriteLiteral(" <tr");
|
||||
WriteLiteral(" data-id=\"");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 40 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.Id);
|
||||
|
||||
|
||||
@@ -316,7 +318,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-status=\"");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 40 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(Model.ShowStatus ? item.StatusId : null);
|
||||
|
||||
|
||||
@@ -327,13 +329,13 @@ WriteLiteral("\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 41 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 49 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 41 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowId)
|
||||
{
|
||||
|
||||
@@ -345,19 +347,56 @@ WriteLiteral(" class=\"id\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(Html.ActionLink(item.Id.ToString(), MVC.Job.Show(item.Id)));
|
||||
#line 43 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 43 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 45 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(Html.ActionLink(item.Id.ToString(), MVC.Job.Show(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td> ");
|
||||
|
||||
#line 45 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 49 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.Id.ToString());
|
||||
|
||||
|
||||
#line 52 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 49 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td> ");
|
||||
|
||||
|
||||
#line 51 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -366,7 +405,7 @@ WriteLiteral("\r\n </td> ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 52 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowStatus)
|
||||
{
|
||||
|
||||
@@ -378,16 +417,16 @@ WriteLiteral(" class=\"status\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2259), Tuple.Create("\"", 2297)
|
||||
, Tuple.Create(Tuple.Create("", 2267), Tuple.Create("icon", 2267), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2271), Tuple.Create("JobStatus", 2272), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2336), Tuple.Create("\"", 2374)
|
||||
, Tuple.Create(Tuple.Create("", 2344), Tuple.Create("icon", 2344), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2348), Tuple.Create("JobStatus", 2349), true)
|
||||
|
||||
#line 55 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2281), Tuple.Create<System.Object, System.Int32>(item.StatusId
|
||||
#line 54 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2358), Tuple.Create<System.Object, System.Int32>(item.StatusId
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2281), false)
|
||||
, 2358), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></span>\r\n");
|
||||
@@ -395,7 +434,7 @@ WriteLiteral("></span>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 55 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.StatusDescription);
|
||||
|
||||
|
||||
@@ -404,7 +443,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td> ");
|
||||
|
||||
|
||||
#line 57 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 56 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -413,7 +452,7 @@ WriteLiteral("\r\n </td> ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 57 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowDates)
|
||||
{
|
||||
|
||||
@@ -428,7 +467,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 59 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.OpenedDate));
|
||||
|
||||
|
||||
@@ -437,7 +476,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n - ");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 60 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(item.ClosedDate));
|
||||
|
||||
|
||||
@@ -446,7 +485,7 @@ WriteLiteral("\r\n - ");
|
||||
WriteLiteral("\r\n </td>");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 61 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -455,7 +494,7 @@ WriteLiteral("\r\n </td>");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 62 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowType)
|
||||
{
|
||||
|
||||
@@ -467,20 +506,20 @@ WriteLiteral(" class=\"type\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2793), Tuple.Create("\"", 2822)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2870), Tuple.Create("\"", 2899)
|
||||
|
||||
#line 65 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2801), Tuple.Create<System.Object, System.Int32>(item.TypeDescription
|
||||
#line 64 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2878), Tuple.Create<System.Object, System.Int32>(item.TypeDescription
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2801), false)
|
||||
, 2878), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 64 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.TypeId);
|
||||
|
||||
|
||||
@@ -489,7 +528,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n </td>");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 65 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -498,7 +537,7 @@ WriteLiteral("</span>\r\n </td>");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 66 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowDevice)
|
||||
{
|
||||
|
||||
@@ -511,29 +550,64 @@ WriteLiteral(" class=\"device\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 69 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 68 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 69 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 68 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (item.DeviceSerialNumber != null)
|
||||
{
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 72 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(Html.ActionLink(item.DeviceSerialNumber, MVC.Device.Show(item.DeviceSerialNumber), new { Title = item.DeviceModelDescription }));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 71 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 72 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3565), Tuple.Create("\"", 3601)
|
||||
|
||||
#line 76 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3573), Tuple.Create<System.Object, System.Int32>(item.DeviceModelDescription
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3573), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 76 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.DeviceSerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 77 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -548,7 +622,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">N/A</span>\r\n");
|
||||
|
||||
|
||||
#line 76 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 82 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -557,7 +631,7 @@ WriteLiteral(">N/A</span>\r\n");
|
||||
WriteLiteral(" </td> ");
|
||||
|
||||
|
||||
#line 77 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 83 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -566,7 +640,7 @@ WriteLiteral(" </td> ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 84 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowUser)
|
||||
{
|
||||
|
||||
@@ -579,29 +653,49 @@ WriteLiteral(" class=\"user\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 80 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 86 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 80 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 86 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (item.UserId != null)
|
||||
{
|
||||
if (Authorization.Has(Claims.User.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 82 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 90 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(Html.ActionLink(string.Format("{0} ({1})", item.UserDisplayName, item.UserId), MVC.User.Show(item.UserId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 82 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 90 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 94 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(string.Format("{0} ({1})", item.UserDisplayName, item.UserId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 94 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -616,7 +710,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">N/A</span>\r\n");
|
||||
|
||||
|
||||
#line 87 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 100 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -625,7 +719,7 @@ WriteLiteral(">N/A</span>\r\n");
|
||||
WriteLiteral(" </td>");
|
||||
|
||||
|
||||
#line 88 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 101 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -634,7 +728,7 @@ WriteLiteral(" </td>");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 89 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 102 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowTechnician)
|
||||
{
|
||||
|
||||
@@ -646,20 +740,20 @@ WriteLiteral(" class=\"technician\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4148), Tuple.Create("\"", 4187)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4937), Tuple.Create("\"", 4976)
|
||||
|
||||
#line 91 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4156), Tuple.Create<System.Object, System.Int32>(item.OpenedTechUserDisplayName
|
||||
#line 104 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4945), Tuple.Create<System.Object, System.Int32>(item.OpenedTechUserDisplayName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4156), false)
|
||||
, 4945), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 91 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 104 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.OpenedTechUserId);
|
||||
|
||||
|
||||
@@ -668,7 +762,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("\r\n </span>\r\n </td>");
|
||||
|
||||
|
||||
#line 93 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 106 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -677,7 +771,7 @@ WriteLiteral("\r\n </span>\r\n
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 94 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 107 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
if (Model.ShowLocation)
|
||||
{
|
||||
|
||||
@@ -690,7 +784,7 @@ WriteLiteral(" class=\"technician\"");
|
||||
WriteLiteral(">\r\n <span>");
|
||||
|
||||
|
||||
#line 96 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 109 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.Location ?? "Unknown");
|
||||
|
||||
|
||||
@@ -699,7 +793,7 @@ WriteLiteral(">\r\n <span>");
|
||||
WriteLiteral("\r\n </span>\r\n </td>");
|
||||
|
||||
|
||||
#line 98 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 111 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -708,7 +802,7 @@ WriteLiteral("\r\n </span>\r\n
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 100 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 113 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -717,7 +811,7 @@ WriteLiteral(" </tr>\r\n");
|
||||
WriteLiteral(" </tbody>\r\n </table>\r\n");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 116 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -732,7 +826,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Jobs Found</span>\r\n");
|
||||
|
||||
|
||||
#line 107 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
#line 120 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,28 +22,72 @@
|
||||
<img src="@Links.ClientSource.Style.Images.Heading_png" alt="DISCO - ICT Asset Management" /></a>
|
||||
</div>
|
||||
<div id="headerMenu">
|
||||
<span>Welcome @Html.ActionLink(DiscoApplication.CurrentUser.ToString(), MVC.User.Show(DiscoApplication.CurrentUser.Id))</span>
|
||||
@using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get)) { @Html.TextBox("term", null, new { accesskey = "s" }) }
|
||||
<span>Welcome @if (Authorization.Has(Claims.User.Show))
|
||||
{ @Html.ActionLink(CurrentUser.ToString(), MVC.User.Show(CurrentUser.Id))}
|
||||
else
|
||||
{@CurrentUser.ToString()}</span>
|
||||
@using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{ @Html.TextBox("term", null, new { accesskey = "s" }) }
|
||||
</div>
|
||||
</div>
|
||||
<nav>
|
||||
<ul id="menu">
|
||||
<li class="hasSubMenu">@Html.ActionLink("Jobs", MVC.Job.Index(), accesskey: "1")
|
||||
<ul class="subMenu">
|
||||
<li>@Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn())</li>
|
||||
<li>@Html.ActionLink("Device Held Locations", MVC.Job.Locations())</li>
|
||||
<li>@Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction())</li>
|
||||
<li class="hasSubMenu">@Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance())
|
||||
<ul class="subMenu">
|
||||
<li>@Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge())</li>
|
||||
<li>@Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment())</li>
|
||||
<li>@Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach())</li>
|
||||
<li>@Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing())</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>@Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair())</li>
|
||||
<li>@Html.ActionLink("All Open", MVC.Job.AllOpen())</li>
|
||||
<li>@Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed())</li>
|
||||
@if (Authorization.Has(Claims.Job.Lists.DevicesReadyForReturn))
|
||||
{
|
||||
<li>@Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn())</li>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Lists.Locations))
|
||||
{
|
||||
<li>@Html.ActionLink("Device Held Locations", MVC.Job.Locations())</li>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Lists.AwaitingUserAction))
|
||||
{
|
||||
<li>@Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction())</li>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Lists.AwaitingFinance))
|
||||
{
|
||||
if (Authorization.HasAny(Claims.Job.Lists.AwaitingFinanceCharge, Claims.Job.Lists.AwaitingFinancePayment, Claims.Job.Lists.AwaitingFinanceAgreementBreach, Claims.Job.Lists.AwaitingFinanceInsuranceProcessing))
|
||||
{
|
||||
<li class="hasSubMenu">@Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance())
|
||||
<ul class="subMenu">
|
||||
@if (Authorization.Has(Claims.Job.Lists.AwaitingFinanceCharge))
|
||||
{
|
||||
<li>@Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge())</li>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Lists.AwaitingFinancePayment))
|
||||
{
|
||||
<li>@Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment())</li>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Lists.AwaitingFinanceAgreementBreach))
|
||||
{
|
||||
<li>@Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach())</li>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Lists.AwaitingFinanceInsuranceProcessing))
|
||||
{
|
||||
<li>@Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing())</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li>@Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance())</li>
|
||||
}
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Lists.DevicesAwaitingRepair))
|
||||
{
|
||||
<li>@Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair())</li>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Lists.AllOpen))
|
||||
{
|
||||
<li>@Html.ActionLink("All Open", MVC.Job.AllOpen())</li>
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Lists.RecentlyClosed))
|
||||
{
|
||||
<li>@Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed())</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
<li class="sep"></li>
|
||||
@@ -51,8 +95,11 @@
|
||||
<li class="sep"></li>
|
||||
<li>@Html.ActionLink("Users", MVC.User.Index(), accesskey: "3")</li>
|
||||
<li class="moveRight">@Html.ActionLink("Public Reports", MVC.Public.Public.Index())</li>
|
||||
<li class="sep"></li>
|
||||
<li>@Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0")</li>
|
||||
@if (Authorization.Has(Claims.Config.Show))
|
||||
{
|
||||
<li class="sep"></li>
|
||||
<li>@Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0")</li>
|
||||
}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Shared
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Shared/_Layout.cshtml")]
|
||||
public partial class Layout : System.Web.Mvc.WebViewPage<dynamic>
|
||||
public partial class Layout : Disco.Services.Web.WebViewPage<dynamic>
|
||||
{
|
||||
public Layout()
|
||||
{
|
||||
@@ -154,35 +156,64 @@ WriteLiteral(">\r\n <span>Welcome ");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink(DiscoApplication.CurrentUser.ToString(), MVC.User.Show(DiscoApplication.CurrentUser.Id)));
|
||||
if (Authorization.Has(Claims.User.Show))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink(CurrentUser.ToString(), MVC.User.Show(CurrentUser.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 28 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(CurrentUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 28 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 26 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 29 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Views\Shared\_Layout.cshtml"
|
||||
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get)) {
|
||||
#line 29 "..\..\Views\Shared\_Layout.cshtml"
|
||||
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.TextBox("term", null, new { accesskey = "s" }));
|
||||
#line 30 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.TextBox("term", null, new { accesskey = "s" }));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 26 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
#line 30 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -199,7 +230,7 @@ WriteLiteral(" class=\"hasSubMenu\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Jobs", MVC.Job.Index(), accesskey: "1"));
|
||||
|
||||
|
||||
@@ -209,123 +240,367 @@ WriteLiteral("\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"subMenu\"");
|
||||
|
||||
WriteLiteral(">\r\n <li>");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn()));
|
||||
#line 37 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 37 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.DevicesReadyForReturn))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 34 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Device Held Locations", MVC.Job.Locations()));
|
||||
#line 39 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Devices Ready for Return", MVC.Job.DevicesReadyForReturn()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction()));
|
||||
#line 40 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.Locations))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Device Held Locations", MVC.Job.Locations()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.AwaitingUserAction))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Awaiting User Action", MVC.Job.AwaitingUserAction()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 48 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.AwaitingFinance))
|
||||
{
|
||||
if (Authorization.HasAny(Claims.Job.Lists.AwaitingFinanceCharge, Claims.Job.Lists.AwaitingFinancePayment, Claims.Job.Lists.AwaitingFinanceAgreementBreach, Claims.Job.Lists.AwaitingFinanceInsuranceProcessing))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteLiteral(" class=\"hasSubMenu\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance()));
|
||||
#line 53 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <ul");
|
||||
WriteLiteral("\r\n <ul");
|
||||
|
||||
WriteLiteral(" class=\"subMenu\"");
|
||||
|
||||
WriteLiteral(">\r\n <li>");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge()));
|
||||
#line 55 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 55 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.AwaitingFinanceCharge))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment()));
|
||||
#line 57 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Accounting Charge", MVC.Job.AwaitingFinanceCharge()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach()));
|
||||
#line 58 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing()));
|
||||
#line 59 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.AwaitingFinancePayment))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n </ul>\r\n </li>\r\n" +
|
||||
" <li>");
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair()));
|
||||
#line 61 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Accounting Payment", MVC.Job.AwaitingFinancePayment()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("All Open", MVC.Job.AllOpen()));
|
||||
#line 62 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li>");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed()));
|
||||
#line 63 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.AwaitingFinanceAgreementBreach))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n </ul>\r\n </li>\r\n " +
|
||||
" <li");
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Agreement Breach", MVC.Job.AwaitingFinanceAgreementBreach()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 66 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.AwaitingFinanceInsuranceProcessing))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 69 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Insurance Processing", MVC.Job.AwaitingFinanceInsuranceProcessing()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 70 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n </li>\r" +
|
||||
"\n");
|
||||
|
||||
|
||||
#line 73 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 76 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Awaiting Finance", MVC.Job.AwaitingFinance()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 77 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 79 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.DevicesAwaitingRepair))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 81 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Awaiting Device Repair", MVC.Job.DevicesAwaitingRepair()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.AllOpen))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 85 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("All Open", MVC.Job.AllOpen()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 86 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 87 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Lists.RecentlyClosed))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 89 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Recently Closed", MVC.Job.RecentlyClosed()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 90 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n </li>\r\n <li" +
|
||||
"");
|
||||
|
||||
WriteLiteral(" class=\"sep\"");
|
||||
|
||||
WriteLiteral("></li>\r\n <li>");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 94 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2"));
|
||||
|
||||
|
||||
@@ -338,7 +613,7 @@ WriteLiteral(" class=\"sep\"");
|
||||
WriteLiteral("></li>\r\n <li>");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 96 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Users", MVC.User.Index(), accesskey: "3"));
|
||||
|
||||
|
||||
@@ -351,34 +626,60 @@ WriteLiteral(" class=\"moveRight\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 97 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Public Reports", MVC.Public.Public.Index()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n <li");
|
||||
|
||||
WriteLiteral(" class=\"sep\"");
|
||||
|
||||
WriteLiteral("></li>\r\n <li>");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0"));
|
||||
#line 98 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 98 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Config.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n </ul>\r\n </nav>\r\n </header>\r\n <div" +
|
||||
"");
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteLiteral(" class=\"sep\"");
|
||||
|
||||
WriteLiteral("></li>\r\n");
|
||||
|
||||
WriteLiteral(" <li>");
|
||||
|
||||
|
||||
#line 101 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 102 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n </nav>\r\n </header>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"layout_PageHeading\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 59 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 106 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs(ViewBag.Title ?? string.Empty));
|
||||
|
||||
|
||||
@@ -393,7 +694,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 108 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(RenderBody());
|
||||
|
||||
|
||||
@@ -402,7 +703,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v");
|
||||
|
||||
|
||||
#line 64 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 111 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.Version);
|
||||
|
||||
|
||||
@@ -413,7 +714,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("@ ");
|
||||
|
||||
|
||||
#line 64 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 111 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.OrganisationName);
|
||||
|
||||
|
||||
@@ -423,7 +724,7 @@ WriteLiteral(" | <a\r\n href=\"http://discoict.com.au/\" target=\
|
||||
"m.au</a> | ");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 112 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Credits", MVC.Public.Public.Credits()));
|
||||
|
||||
|
||||
@@ -432,7 +733,7 @@ WriteLiteral(" | <a\r\n href=\"http://discoict.com.au/\" target=\
|
||||
WriteLiteral(" | ");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 112 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Licence", MVC.Public.Public.Licence()));
|
||||
|
||||
|
||||
@@ -441,13 +742,13 @@ WriteLiteral(" | ");
|
||||
WriteLiteral("\r\n </footer>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 68 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 115 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 68 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 115 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this);
|
||||
|
||||
#line default
|
||||
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Shared
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Shared/_SearchDialog.cshtml")]
|
||||
public partial class SearchDialog : System.Web.Mvc.WebViewPage<string>
|
||||
public partial class SearchDialog : Disco.Services.Web.WebViewPage<string>
|
||||
{
|
||||
public SearchDialog()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.Update
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/Update/Index.cshtml")]
|
||||
public partial class Index : System.Web.Mvc.WebViewPage<Disco.Web.Models.Update.IndexModel>
|
||||
public partial class Index : Disco.Services.Web.WebViewPage<Disco.Web.Models.Update.IndexModel>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
@model Disco.Web.Models.User.ShowModel
|
||||
@{
|
||||
ViewBag.Title = Html.ToBreadcrumb("Users", MVC.User.Index(), string.Format("{0} ({1})", Model.User.DisplayName, Model.User.Id));
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
}
|
||||
<table class="userShow">
|
||||
<tr>
|
||||
<th class="name">Id:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.Id
|
||||
</td>
|
||||
<th class="name">Given Name:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.GivenName
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">Type:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.Type
|
||||
</td>
|
||||
<th class="name">Surname:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.Surname
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">Display Name:
|
||||
</th>
|
||||
<td class="value" colspan="3">
|
||||
@Model.User.DisplayName
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">Email Address:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.EmailAddress
|
||||
</td>
|
||||
<th class="name">Phone Number:
|
||||
</th>
|
||||
<td class="value">
|
||||
@Model.User.PhoneNumber
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">Assigned Devices:
|
||||
</th>
|
||||
<td class="value" colspan="3">
|
||||
@Html.Partial(MVC.User.Views._UserDeviceAssignmentHistoryTable, Model.User)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="name">Generate Documents:
|
||||
</th>
|
||||
<td class="value" colspan="3">
|
||||
@Html.DropDownList("DocumentTemplates", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.User.GeneratePdf(Model.User.Id, null))?DocumentTemplateId=';
|
||||
var $documentTemplates = $('#DocumentTemplates');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
window.location.href = generatePdfUrl + v;
|
||||
$documentTemplates.val('');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Jobs</h2>
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs)
|
||||
<h2>Attachments</h2>
|
||||
@Html.Partial(MVC.User.Views.UserParts.Resources, Model)
|
||||
<div class="actionBar">
|
||||
@Html.ActionLinkButton("Create Job", MVC.Job.Create(Model.PrimaryDeviceSerialNumber, Model.User.Id), "buttonCreateJob")
|
||||
</div>
|
||||
@@ -1,80 +0,0 @@
|
||||
@model Disco.Models.Repository.User
|
||||
@{
|
||||
var userId = Model.Id;
|
||||
}
|
||||
@if (Model.DeviceUserAssignments.Count > 0)
|
||||
{
|
||||
<table class="genericData smallTable" id="User_AssignedDevice_History_@(userId)">
|
||||
<tr>
|
||||
<th>
|
||||
Device Serial #
|
||||
</th>
|
||||
<th>
|
||||
Device Asset #
|
||||
</th>
|
||||
<th>
|
||||
Device Model
|
||||
</th>
|
||||
<th>
|
||||
Assigned
|
||||
</th>
|
||||
<th>
|
||||
Unassigned
|
||||
</th>
|
||||
</tr>
|
||||
@foreach (var dua in Model.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate))
|
||||
{
|
||||
<tr class="assignmentActive@((!dua.UnassignedDate.HasValue).ToString())">
|
||||
<td>
|
||||
@Html.ActionLink(dua.Device.SerialNumber, MVC.Device.Show(dua.DeviceSerialNumber))
|
||||
</td>
|
||||
<td>
|
||||
@dua.Device.AssetNumber
|
||||
</td>
|
||||
<td>
|
||||
@dua.Device.DeviceModel.ToString()
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(dua.AssignedDate)
|
||||
</td>
|
||||
<td>
|
||||
@CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current")
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (Model.DeviceUserAssignments.Count(m => !m.UnassignedDate.HasValue) == 0)
|
||||
{
|
||||
<tr class="noActiveAssignments">
|
||||
<td colspan="5">
|
||||
<span class="smallMessage">No Active Assignments</span>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<a href="#" id="User_AssignedDevice_History_Trigger_@(userId)" class="smallLink">Show
|
||||
All Assignment History (<span id="User_AssignedDevice_History_RecordCount_@(userId)"></span>)</a>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $table = $('#User_AssignedDevice_History_@(userId)');
|
||||
var $inactiveRecords = $table.find('tr.assignmentActiveFalse').hide();
|
||||
if ($inactiveRecords.length != 0) {
|
||||
var recordCountText = $inactiveRecords.length + ' record';
|
||||
if ($inactiveRecords.length != 1)
|
||||
recordCountText += 's';
|
||||
$('#User_AssignedDevice_History_RecordCount_@(userId)').text(recordCountText);
|
||||
$('#User_AssignedDevice_History_Trigger_@(userId)').click(function () {
|
||||
$(this).hide();
|
||||
$table.find('tr.noActiveAssignments').hide();
|
||||
$inactiveRecords.show();
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
$('#User_AssignedDevice_History_Trigger_@(userId)').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="smallMessage">No Assignment History Available</span>
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
@{
|
||||
ViewBag.Title = "Users";
|
||||
}
|
||||
<h3>
|
||||
Search for a User</h3>
|
||||
@Html.Partial(MVC.Shared.Views._SearchDialog, "users")
|
||||
@if (Authorization.Has(Claims.User.Search))
|
||||
{
|
||||
<h3>Search for a User</h3>
|
||||
@Html.Partial(MVC.Shared.Views._SearchDialog, "users")
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.User
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/User/Index.cshtml")]
|
||||
public partial class Index : System.Web.Mvc.WebViewPage<dynamic>
|
||||
public partial class Index : Disco.Services.Web.WebViewPage<dynamic>
|
||||
{
|
||||
public Index()
|
||||
{
|
||||
@@ -48,17 +50,38 @@ namespace Disco.Web.Views.User
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<h3>\r\n Search for a User</h3>\r\n");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\User\Index.cshtml"
|
||||
#line 4 "..\..\Views\User\Index.cshtml"
|
||||
if (Authorization.Has(Claims.User.Search))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <h3>Search for a User</h3>\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\User\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Views\User\Index.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._SearchDialog, "users"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\User\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@model Disco.Web.Models.User.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.User.Show);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Users", MVC.User.Index(), string.Format("User: {0} ({1})", Model.User.DisplayName, Model.User.Id));
|
||||
}
|
||||
<div id="User_Show">
|
||||
@@ -7,36 +9,53 @@
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var $tabs = $('#UserDetailTabs');
|
||||
$tabs.tabs({
|
||||
activate: function (event, ui) {
|
||||
window.setTimeout(function () {
|
||||
var $window = $(window);
|
||||
var tabHeight = $tabs.height();
|
||||
var tabOffset = $tabs.offset();
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var windowHeight = $window.height();
|
||||
if ($tabs.children().length > 1) {
|
||||
$tabs.tabs({
|
||||
activate: function (event, ui) {
|
||||
window.setTimeout(function () {
|
||||
var $window = $(window);
|
||||
var tabHeight = $tabs.height();
|
||||
var tabOffset = $tabs.offset();
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var windowHeight = $window.height();
|
||||
|
||||
var tabTopNotShown = windowScrollTop - tabOffset.top;
|
||||
if (tabTopNotShown > 0) {
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
} else {
|
||||
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
|
||||
if (tabBottomNotShown > 0) {
|
||||
if (tabHeight > windowHeight)
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
else
|
||||
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
|
||||
var tabTopNotShown = windowScrollTop - tabOffset.top;
|
||||
if (tabTopNotShown > 0) {
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
} else {
|
||||
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
|
||||
if (tabBottomNotShown > 0) {
|
||||
if (tabHeight > windowHeight)
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
else
|
||||
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$tabs.hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div id="UserDetailTabs">
|
||||
<ul id="UserDetailTabItems"></ul>
|
||||
@Html.Partial(MVC.User.Views.UserParts._Jobs, Model)
|
||||
@Html.Partial(MVC.User.Views.UserParts._AssignmentHistory, Model)
|
||||
@Html.Partial(MVC.User.Views.UserParts._Resources, Model)
|
||||
@if (Authorization.Has(Claims.User.ShowJobs))
|
||||
{
|
||||
@Html.Partial(MVC.User.Views.UserParts._Jobs, Model)
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.ShowAssignmentHistory))
|
||||
{
|
||||
@Html.Partial(MVC.User.Views.UserParts._AssignmentHistory, Model)
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.ShowAttachments))
|
||||
{
|
||||
@Html.Partial(MVC.User.Views.UserParts._Resources, Model)
|
||||
}
|
||||
@if (Authorization.Has(Claims.User.ShowAuthorization))
|
||||
{
|
||||
@Html.Partial(MVC.User.Views.UserParts._Authorization, Model)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.User
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/User/Show.cshtml")]
|
||||
public partial class Show : System.Web.Mvc.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
public partial class Show : Disco.Services.Web.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
{
|
||||
public Show()
|
||||
{
|
||||
@@ -43,6 +45,8 @@ namespace Disco.Web.Views.User
|
||||
|
||||
#line 2 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
Authorization.Require(Claims.User.Show);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Users", MVC.User.Index(), string.Format("User: {0} ({1})", Model.User.DisplayName, Model.User.Id));
|
||||
|
||||
|
||||
@@ -57,7 +61,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 6 "..\..\Views\User\Show.cshtml"
|
||||
#line 8 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Subject, Model));
|
||||
|
||||
|
||||
@@ -67,36 +71,26 @@ WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
var $tabs = $('#UserDetailTabs');
|
||||
$tabs.tabs({
|
||||
activate: function (event, ui) {
|
||||
window.setTimeout(function () {
|
||||
var $window = $(window);
|
||||
var tabHeight = $tabs.height();
|
||||
var tabOffset = $tabs.offset();
|
||||
var windowScrollTop = $window.scrollTop();
|
||||
var windowHeight = $window.height();
|
||||
|
||||
var tabTopNotShown = windowScrollTop - tabOffset.top;
|
||||
if (tabTopNotShown > 0) {
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
} else {
|
||||
var tabBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top)) * -1;
|
||||
if (tabBottomNotShown > 0) {
|
||||
if (tabHeight > windowHeight)
|
||||
$('html').animate({ scrollTop: tabOffset.top }, 125);
|
||||
else
|
||||
$('html').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);
|
||||
}
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div");
|
||||
WriteLiteral(">\r\n $(function () {\r\n var $tabs = $(\'#UserDetailTabs\');\r\n " +
|
||||
" if ($tabs.children().length > 1) {\r\n $tabs.tabs({\r\n " +
|
||||
" activate: function (event, ui) {\r\n window.set" +
|
||||
"Timeout(function () {\r\n var $window = $(window);\r\n " +
|
||||
" var tabHeight = $tabs.height();\r\n " +
|
||||
" var tabOffset = $tabs.offset();\r\n var windowScr" +
|
||||
"ollTop = $window.scrollTop();\r\n var windowHeight = $w" +
|
||||
"indow.height();\r\n\r\n var tabTopNotShown = windowScroll" +
|
||||
"Top - tabOffset.top;\r\n if (tabTopNotShown > 0) {\r\n " +
|
||||
" $(\'html\').animate({ scrollTop: tabOffset.top }, 125" +
|
||||
");\r\n } else {\r\n var ta" +
|
||||
"bBottomNotShown = ((windowScrollTop + windowHeight) - (tabHeight + tabOffset.top" +
|
||||
")) * -1;\r\n if (tabBottomNotShown > 0) {\r\n " +
|
||||
" if (tabHeight > windowHeight)\r\n " +
|
||||
" $(\'html\').animate({ scrollTop: tabOffset.top }, 125);\r\n " +
|
||||
" else\r\n $(\'h" +
|
||||
"tml\').animate({ scrollTop: windowScrollTop + tabBottomNotShown }, 125);\r\n " +
|
||||
" }\r\n }\r\n " +
|
||||
" }, 1);\r\n }\r\n });\r\n } else {\r\n " +
|
||||
" $tabs.hide();\r\n }\r\n });\r\n </script>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"UserDetailTabs\"");
|
||||
|
||||
@@ -106,38 +100,111 @@ WriteLiteral(" id=\"UserDetailTabItems\"");
|
||||
|
||||
WriteLiteral("></ul>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Jobs, Model));
|
||||
#line 44 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 44 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowJobs))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Jobs, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._AssignmentHistory, Model));
|
||||
#line 46 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Resources, Model));
|
||||
#line 48 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAssignmentHistory))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 50 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._AssignmentHistory, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n</div>");
|
||||
|
||||
#line 50 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAttachments))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Resources, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 56 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAuthorization))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 58 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Authorization, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 58 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n</div>\r\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
@model Disco.Web.Models.User.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.User.ShowAssignmentHistory);
|
||||
}
|
||||
<div id="UserDetailTab-AssignmentHistory" class="UserPart">
|
||||
@if (Model.User.DeviceUserAssignments.Count > 0)
|
||||
{
|
||||
@@ -19,7 +22,14 @@
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(dua.Device.SerialNumber, MVC.Device.Show(dua.DeviceSerialNumber))
|
||||
@if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
@Html.ActionLink(dua.Device.SerialNumber, MVC.Device.Show(dua.DeviceSerialNumber))
|
||||
}
|
||||
else
|
||||
{
|
||||
@dua.Device.SerialNumber
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@dua.Device.AssetNumber
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,19 +28,29 @@ namespace Disco.Web.Views.User.UserParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/User/UserParts/_AssignmentHistory.cshtml")]
|
||||
public partial class AssignmentHistory : System.Web.Mvc.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
public partial class AssignmentHistory : Disco.Services.Web.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
{
|
||||
public AssignmentHistory()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
#line 2 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
Authorization.Require(Claims.User.ShowAssignmentHistory);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"UserDetailTab-AssignmentHistory\"");
|
||||
|
||||
@@ -49,13 +59,13 @@ WriteLiteral(" class=\"UserPart\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 3 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 6 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 3 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 6 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
if (Model.User.DeviceUserAssignments.Count > 0)
|
||||
{
|
||||
|
||||
@@ -82,13 +92,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 18 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 21 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 18 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 21 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
foreach (var dua in Model.User.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate))
|
||||
{
|
||||
|
||||
@@ -97,21 +107,58 @@ WriteLiteral(@">
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 22 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(Html.ActionLink(dua.Device.SerialNumber, MVC.Device.Show(dua.DeviceSerialNumber)));
|
||||
#line 25 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 25 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(Html.ActionLink(dua.Device.SerialNumber, MVC.Device.Show(dua.DeviceSerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
#line 27 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(dua.Device.SerialNumber);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 35 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(dua.Device.AssetNumber);
|
||||
|
||||
|
||||
@@ -122,7 +169,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 38 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(dua.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
@@ -133,7 +180,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 41 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(dua.AssignedDate));
|
||||
|
||||
|
||||
@@ -144,7 +191,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 34 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 44 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current"));
|
||||
|
||||
|
||||
@@ -153,7 +200,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 37 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 47 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -162,7 +209,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 49 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -177,7 +224,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Assignment History Available</span>\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 53 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +234,7 @@ WriteLiteral(" <script>\r\n $(\'#UserDetailTabItems\').append(\'<li><a
|
||||
"b-AssignmentHistory\">Assignment History [");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
#line 55 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
|
||||
Write(Model.User.DeviceUserAssignments.Count);
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
@model Disco.Web.Models.User.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.User.ShowAuthorization);
|
||||
|
||||
Html.BundleDeferred("~/Style/Fancytree");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Fancytree");
|
||||
}
|
||||
<div id="UserDetailTab-Authorization" class="UserPart">
|
||||
<div id="UserDetailTab-AuthorizationContainer">
|
||||
|
||||
@if (Model.ClaimNavigator != null)
|
||||
{
|
||||
<div id="Config_AuthRoles_Claims_Tree">
|
||||
</div>
|
||||
<script>
|
||||
(function(){
|
||||
var claimNodes = @(new HtmlString(Newtonsoft.Json.JsonConvert.SerializeObject(Model.ClaimNavigatorFancyTreeNodes)));
|
||||
|
||||
$(function(){
|
||||
var tree = $('#Config_AuthRoles_Claims_Tree').fancytree({
|
||||
source: claimNodes,
|
||||
checkbox: true,
|
||||
selectMode: 3
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>NO ACCESS</div>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$('#UserDetailTabItems').append('<li><a href="#UserDetailTab-Authorization">Authorization</a></li>');
|
||||
</script>
|
||||
</div>
|
||||
@@ -0,0 +1,136 @@
|
||||
#pragma warning disable 1591
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Disco.Web.Views.User.UserParts
|
||||
{
|
||||
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.BI.Extensions;
|
||||
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("~/Views/User/UserParts/_Authorization.cshtml")]
|
||||
public partial class Authorization : Disco.Services.Web.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
{
|
||||
public Authorization()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
|
||||
#line 2 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
|
||||
Authorization.Require(Claims.User.ShowAuthorization);
|
||||
|
||||
Html.BundleDeferred("~/Style/Fancytree");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-Fancytree");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"UserDetailTab-Authorization\"");
|
||||
|
||||
WriteLiteral(" class=\"UserPart\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"UserDetailTab-AuthorizationContainer\"");
|
||||
|
||||
WriteLiteral(">\r\n \r\n");
|
||||
|
||||
|
||||
#line 11 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 11 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
if (Model.ClaimNavigator != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"Config_AuthRoles_Claims_Tree\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script>\r\n (function(){\r\n " +
|
||||
" var claimNodes = ");
|
||||
|
||||
|
||||
#line 17 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
Write(new HtmlString(Newtonsoft.Json.JsonConvert.SerializeObject(Model.ClaimNavigatorFancyTreeNodes)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@";
|
||||
|
||||
$(function(){
|
||||
var tree = $('#Config_AuthRoles_Claims_Tree').fancytree({
|
||||
source: claimNodes,
|
||||
checkbox: true,
|
||||
selectMode: 3
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 28 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div>NO ACCESS</div>\r\n");
|
||||
|
||||
|
||||
#line 32 "..\..\Views\User\UserParts\_Authorization.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n\r\n </div>\r\n <script>\r\n $(\'#UserDetailTabItems\').append(\'<li><a hre" +
|
||||
"f=\"#UserDetailTab-Authorization\">Authorization</a></li>\');\r\n </script>\r\n</div" +
|
||||
">");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore 1591
|
||||
@@ -1,4 +1,7 @@
|
||||
@model Disco.Web.Models.User.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.User.ShowJobs);
|
||||
}
|
||||
<div id="UserDetailTab-Jobs" class="UserPart">
|
||||
<div id="UserDetailTab-JobsContainer">
|
||||
@Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,19 +28,29 @@ namespace Disco.Web.Views.User.UserParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/User/UserParts/_Jobs.cshtml")]
|
||||
public partial class Jobs : System.Web.Mvc.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
public partial class Jobs : Disco.Services.Web.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
{
|
||||
public Jobs()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
{
|
||||
WriteLiteral("<div");
|
||||
|
||||
#line 2 "..\..\Views\User\UserParts\_Jobs.cshtml"
|
||||
|
||||
Authorization.Require(Claims.User.ShowJobs);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"UserDetailTab-Jobs\"");
|
||||
|
||||
@@ -55,7 +65,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 4 "..\..\Views\User\UserParts\_Jobs.cshtml"
|
||||
#line 7 "..\..\Views\User\UserParts\_Jobs.cshtml"
|
||||
Write(Html.Partial(MVC.Shared.Views._JobTable, Model.Jobs));
|
||||
|
||||
|
||||
@@ -65,7 +75,7 @@ WriteLiteral("\r\n </div>\r\n <script>\r\n $(\'#UserDetailTabItems\
|
||||
"\"#UserDetailTab-Jobs\">Jobs [");
|
||||
|
||||
|
||||
#line 7 "..\..\Views\User\UserParts\_Jobs.cshtml"
|
||||
#line 10 "..\..\Views\User\UserParts\_Jobs.cshtml"
|
||||
Write(Model.User.Jobs == null ? 0 : Model.User.Jobs.Count);
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,23 @@
|
||||
@model Disco.Web.Models.User.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.User.ShowAttachments);
|
||||
|
||||
var canAddAttachments = Authorization.Has(Claims.User.Actions.AddAttachments);
|
||||
var canRemoveAnyAttachments = Authorization.Has(Claims.User.Actions.RemoveAnyAttachments);
|
||||
var canRemoveOwnAttachments = Authorization.Has(Claims.User.Actions.RemoveOwnAttachments);
|
||||
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
|
||||
if (Authorization.Has(Claims.User.Actions.AddAttachments))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
}
|
||||
}
|
||||
<div id="UserDetailTab-Resources" class="UserPart">
|
||||
<table id="userShowResources">
|
||||
<tr>
|
||||
<td id="Attachments">
|
||||
<td id="Attachments" class="@(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments")">
|
||||
<div class="attachmentOutput">
|
||||
@if (Model.User.UserAttachments != null)
|
||||
{
|
||||
@@ -21,31 +31,35 @@
|
||||
{ @ua.DocumentTemplate.Description}
|
||||
else
|
||||
{ @ua.Comments }}
|
||||
</span><span class="author">@ua.TechUser.ToString()</span><span class="remove"></span>
|
||||
<span class="timestamp" title="@ua.Timestamp.ToFullDateTime()">@ua.Timestamp.ToFuzzy()</span>
|
||||
</span><span class="author">@ua.TechUser.ToString()</span>@if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId == CurrentUser.Id))
|
||||
{<text><span class="remove"></span></text>}<span class="timestamp" title="@ua.Timestamp.ToFullDateTime()">@ua.Timestamp.ToFuzzy()</span>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action upload"></span><span class="action photo"></span>
|
||||
</div>
|
||||
@if (canAddAttachments)
|
||||
{
|
||||
<div class="attachmentInput clearfix">
|
||||
<span class="action upload"></span><span class="action photo"></span>
|
||||
</div>
|
||||
}
|
||||
<script type="text/javascript">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
@if (canAddAttachments)
|
||||
{<text>
|
||||
//#region Add Attachments
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = addAttachment;
|
||||
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogUpload').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
@@ -58,13 +72,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
@@ -83,119 +90,159 @@
|
||||
'UploadUrl=@(Url.Action(MVC.API.User.AttachmentUpload(Model.User.Id, null)))'
|
||||
);
|
||||
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.User.Attachment())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
|
||||
var e = $('<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span><span class="remove"></span><span class="timestamp"></span></a>');
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.User.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.User.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
}
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
var $dialogRemoveAttachment = $('#dialogRemoveAttachment');
|
||||
$dialogRemoveAttachment.dialog("enable");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("disable");
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.User.AttachmentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$this.hide(300).delay(300).queue(function () {
|
||||
var $this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
Shadowbox.removeCache(this);
|
||||
$this.remove();
|
||||
});
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.User.Attachment())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
@if (canRemoveAnyAttachments)
|
||||
{<text>buildAttachment(a, true);</text>}
|
||||
else if (canRemoveOwnAttachments)
|
||||
{<text>buildAttachment(a, (a.AuthorId === '@(CurrentUser.Id)'));</text>}
|
||||
else
|
||||
{<text>buildAttachment(a, false);</text>}
|
||||
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
});
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
function buildAttachment(a, canRemove) {
|
||||
var t = '<a><span class="icon"><img alt="Attachment Thumbnail" /></span><span class="comments"></span><span class="author"></span>';
|
||||
if (canRemove)
|
||||
t += '<span class="remove"></span>';
|
||||
t += '<span class="timestamp"></span></a>';
|
||||
|
||||
var e = $(t);
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.User.AttachmentDownload()))/' + a.Id);
|
||||
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.User.AttachmentThumbnail()))/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
|
||||
if (canRemove)
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
}
|
||||
|
||||
//#endregion
|
||||
</text>}
|
||||
@if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{<text>
|
||||
//#region Remove Attachments
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
return false;
|
||||
}
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
var $dialogRemoveAttachment = $('#dialogRemoveAttachment');
|
||||
$dialogRemoveAttachment.dialog("enable");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
"Remove": function () {
|
||||
$dialogRemoveAttachment.dialog("disable");
|
||||
$dialogRemoveAttachment.dialog("option", "buttons", null);
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.User.AttachmentRemove())',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d == 'OK') {
|
||||
$this.hide(300).delay(300).queue(function () {
|
||||
var $this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
Shadowbox.removeCache(this);
|
||||
$this.remove();
|
||||
});
|
||||
} else {
|
||||
alert('Unable to remove attachment: ' + d);
|
||||
}
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to remove attachment: ' + textStatus);
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
},
|
||||
Cancel: function () {
|
||||
$dialogRemoveAttachment.dialog("close");
|
||||
}
|
||||
});
|
||||
|
||||
$dialogRemoveAttachment.dialog('open');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
</text>}
|
||||
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="dialogUpload" title="Upload Attachment">
|
||||
<div id="silverlightHostUploadAttachment">
|
||||
@if (canAddAttachments)
|
||||
{
|
||||
<div id="dialogUpload" title="Upload Attachment">
|
||||
<div id="silverlightHostUploadAttachment">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dialogRemoveAttachment" title="Remove this Attachment?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
@if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
<div id="dialogRemoveAttachment" title="Remove this Attachment?">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
Are you sure?
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
<script>
|
||||
$('#UserDetailTabItems').append('<li><a href="#UserDetailTab-Resources" id="UserDetailTab-ResourcesLink">Attachments [@(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count)]</a></li>');
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.User.UserParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/User/UserParts/_Resources.cshtml")]
|
||||
public partial class Resources : System.Web.Mvc.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
public partial class Resources : Disco.Services.Web.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
{
|
||||
public Resources()
|
||||
{
|
||||
@@ -43,9 +45,19 @@ namespace Disco.Web.Views.User.UserParts
|
||||
|
||||
#line 2 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
Authorization.Require(Claims.User.ShowAttachments);
|
||||
|
||||
var canAddAttachments = Authorization.Has(Claims.User.Actions.AddAttachments);
|
||||
var canRemoveAnyAttachments = Authorization.Has(Claims.User.Actions.RemoveAnyAttachments);
|
||||
var canRemoveOwnAttachments = Authorization.Has(Claims.User.Actions.RemoveOwnAttachments);
|
||||
|
||||
Html.BundleDeferred("~/Style/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Shadowbox");
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
|
||||
if (Authorization.Has(Claims.User.Actions.AddAttachments))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Silverlight");
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -64,6 +76,16 @@ WriteLiteral(">\r\n <tr>\r\n <td");
|
||||
|
||||
WriteLiteral(" id=\"Attachments\"");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 778), Tuple.Create("\"", 853)
|
||||
|
||||
#line 20 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 786), Tuple.Create<System.Object, System.Int32>(canAddAttachments ? "canAddAttachments" : "cannotAddAttachments"
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 786), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentOutput\"");
|
||||
@@ -71,13 +93,13 @@ WriteLiteral(" class=\"attachmentOutput\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 22 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 12 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 22 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (Model.User.UserAttachments != null)
|
||||
{
|
||||
foreach (var ua in Model.User.UserAttachments)
|
||||
@@ -88,20 +110,20 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 618), Tuple.Create("\"", 676)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1115), Tuple.Create("\"", 1173)
|
||||
|
||||
#line 16 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 625), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentDownload(ua.Id))
|
||||
#line 26 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1122), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentDownload(ua.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 625), false)
|
||||
, 1122), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" data-attachmentid=\"");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 26 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Id);
|
||||
|
||||
|
||||
@@ -112,7 +134,7 @@ WriteLiteral("\"");
|
||||
WriteLiteral(" data-mimetype=\"");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 26 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.MimeType);
|
||||
|
||||
|
||||
@@ -124,68 +146,68 @@ WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 782), Tuple.Create("\"", 802)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1279), Tuple.Create("\"", 1299)
|
||||
|
||||
#line 17 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 790), Tuple.Create<System.Object, System.Int32>(ua.Filename
|
||||
#line 27 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1287), Tuple.Create<System.Object, System.Int32>(ua.Filename
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 790), false)
|
||||
, 1287), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 869), Tuple.Create("\"", 929)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 1366), Tuple.Create("\"", 1426)
|
||||
|
||||
#line 18 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 875), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id))
|
||||
#line 28 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1372), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.User.AttachmentThumbnail(ua.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 875), false)
|
||||
, 1372), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" /></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 992), Tuple.Create("\"", 1012)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1489), Tuple.Create("\"", 1509)
|
||||
|
||||
#line 19 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1000), Tuple.Create<System.Object, System.Int32>(ua.Comments
|
||||
#line 29 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1497), Tuple.Create<System.Object, System.Int32>(ua.Comments
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1000), false)
|
||||
, 1497), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 20 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 30 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 20 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 30 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (!string.IsNullOrEmpty(ua.DocumentTemplateId))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.DocumentTemplate.Description);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 31 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -193,14 +215,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 33 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Comments);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 23 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 33 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -212,35 +234,52 @@ WriteLiteral(" class=\"author\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 24 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 34 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.TechUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span><span");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
WriteLiteral(" class=\"remove\"");
|
||||
|
||||
WriteLiteral("></span>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1432), Tuple.Create("\"", 1470)
|
||||
|
||||
#line 25 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1440), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
|
||||
#line 34 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || (canRemoveOwnAttachments && ua.TechUserId == CurrentUser.Id))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1440), false)
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"remove\"");
|
||||
|
||||
WriteLiteral("></span>");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 2095), Tuple.Create("\"", 2133)
|
||||
|
||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2103), Tuple.Create<System.Object, System.Int32>(ua.Timestamp.ToFullDateTime()
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2103), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Timestamp.ToFuzzy());
|
||||
#line 35 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(ua.Timestamp.ToFuzzy());
|
||||
|
||||
|
||||
#line default
|
||||
@@ -248,18 +287,34 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n </a> \r\n");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 37 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <div");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"attachmentInput clearfix\"");
|
||||
|
||||
WriteLiteral(">\r\n <span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"action upload\"");
|
||||
|
||||
@@ -267,34 +322,69 @@ WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"action photo\"");
|
||||
|
||||
WriteLiteral("></span>\r\n </div>\r\n <script");
|
||||
WriteLiteral("></span>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n Shadowbox.init({\r\n skipSetup: true," +
|
||||
"\r\n modal: true\r\n });\r\n " +
|
||||
" $(function () {\r\n if (!document.DiscoFunctions) {\r\n " +
|
||||
" document.DiscoFunctions = {};\r\n " +
|
||||
" }\r\n document.DiscoFunctions.addAttachment = addAttachmen" +
|
||||
"t;\r\n\r\n $Attachments = $(\'#Attachments\');\r\n " +
|
||||
" $attachmentOutput = $Attachments.find(\'.attachmentOutput\');\r\n\r\n " +
|
||||
" $attachmentOutput.find(\'span.remove\').click(removeAttachment);\r\n" +
|
||||
"\r\n $(\'#dialogUpload\').dialog({\r\n " +
|
||||
" autoOpen: false,\r\n draggable: false,\r\n " +
|
||||
" modal: true,\r\n resizable: false,\r\n " +
|
||||
" width: 860,\r\n height: 550,\r\n" +
|
||||
" close: function () {\r\n " +
|
||||
" silverlightUploadAttachment.content.Navigator.Navigate(\'/Hidden\');\r\n " +
|
||||
" }\r\n });\r\n\r\n $(\'#" +
|
||||
"dialogRemoveAttachment\').dialog({\r\n resizable: false," +
|
||||
"\r\n height: 140,\r\n modal: t" +
|
||||
"rue,\r\n autoOpen: false\r\n });\r\n" +
|
||||
"\r\n var onLoadNavigation = null;\r\n " +
|
||||
"var isLoaded = null;\r\n Silverlight.createObject(\r\n " +
|
||||
" \'");
|
||||
WriteLiteral(@">
|
||||
Shadowbox.init({
|
||||
skipSetup: true,
|
||||
modal: true
|
||||
});
|
||||
$(function () {
|
||||
$Attachments = $('#Attachments');
|
||||
$attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
|
||||
");
|
||||
|
||||
|
||||
#line 71 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 55 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 55 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
//#region Add Attachments
|
||||
if (!document.DiscoFunctions) {
|
||||
document.DiscoFunctions = {};
|
||||
}
|
||||
document.DiscoFunctions.addAttachment = addAttachment;
|
||||
|
||||
$('#dialogUpload').dialog({
|
||||
autoOpen: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
resizable: false,
|
||||
width: 860,
|
||||
height: 550,
|
||||
close: function () {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate('/Hidden');
|
||||
}
|
||||
});
|
||||
|
||||
var onLoadNavigation = null;
|
||||
var isLoaded = null;
|
||||
Silverlight.createObject(
|
||||
'");
|
||||
|
||||
|
||||
#line 78 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
|
||||
|
||||
|
||||
@@ -315,7 +405,7 @@ WriteLiteral(@"',
|
||||
'UploadUrl=");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 90 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentUpload(Model.User.Id, null)));
|
||||
|
||||
|
||||
@@ -324,151 +414,330 @@ WriteLiteral(@"',
|
||||
WriteLiteral(@"'
|
||||
);
|
||||
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
$attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.photo').click(function () {
|
||||
showDialog('/WebCam');
|
||||
});
|
||||
$attachmentInput.find('.upload').click(function () {
|
||||
showDialog('/File');
|
||||
});
|
||||
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '");
|
||||
silverlightUploadAttachment = $('#silverlightUploadAttachment').get(0);
|
||||
function showDialog(navigationPath) {
|
||||
$('#dialogUpload').dialog('open');
|
||||
if (isLoaded) {
|
||||
silverlightUploadAttachment.content.Navigator.Navigate(navigationPath);
|
||||
} else {
|
||||
onLoadNavigation = navigationPath;
|
||||
}
|
||||
};
|
||||
function addAttachment(id, quick) {
|
||||
var data = { id: id };
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 106 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.Attachment()));
|
||||
#line 113 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.Attachment()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
|
||||
var e = $('<a><span class=""icon""><img alt=""Attachment Thumbnail"" /></span><span class=""comments""></span><span class=""author""></span><span class=""remove""></span><span class=""timestamp""></span></a>');
|
||||
|
||||
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (d) {
|
||||
if (d.Result == 'OK') {
|
||||
var a = d.Attachment;
|
||||
");
|
||||
|
||||
|
||||
#line 115 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentDownload()));
|
||||
#line 119 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 119 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("buildAttachment(a, true);");
|
||||
|
||||
|
||||
#line 120 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
else if (canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
|
||||
|
||||
|
||||
#line 122 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(CurrentUser.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', " +
|
||||
"\'");
|
||||
WriteLiteral("\'));");
|
||||
|
||||
|
||||
#line 116 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentThumbnail()));
|
||||
#line 122 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("buildAttachment(a, false);");
|
||||
|
||||
|
||||
#line 124 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Comme" +
|
||||
"nts);\r\n e.find(\'.author\').text(a.Author);\r\n " +
|
||||
" e.find(\'.timestamp\').text(a.TimestampFuzzy).at" +
|
||||
"tr(\'title\', a.TimestampFull);\r\n e.find(\'.remo" +
|
||||
"ve\').click(removeAttachment);\r\n if (!quick)\r\n" +
|
||||
" e.hide();\r\n " +
|
||||
" $attachmentOutput.append(e);\r\n if (!qu" +
|
||||
"ick)\r\n e.show(\'slow\');\r\n " +
|
||||
" if (a.MimeType.toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" e.shadowbox({ gallery: \'attachments\', player: \'" +
|
||||
"img\', title: a.Comments });\r\n } else {\r\n " +
|
||||
" alert(\'Unable to add attachment: \' + d.Result);\r\n " +
|
||||
" }\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to add attachment: \' + textStatus);\r\n " +
|
||||
" }\r\n });\r\n }\r\n " +
|
||||
" function removeAttachment() {\r\n $this = $(this)." +
|
||||
"closest(\'a\');\r\n\r\n var data = { id: $this.attr(\'data-attac" +
|
||||
"hmentid\') };\r\n var $dialogRemoveAttachment = $(\'#dialogRe" +
|
||||
"moveAttachment\');\r\n $dialogRemoveAttachment.dialog(\"enabl" +
|
||||
"e\");\r\n $dialogRemoveAttachment.dialog(\'option\', \'buttons\'" +
|
||||
", {\r\n \"Remove\": function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"disable\");\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"option\", \"buttons\", null);\r\n " +
|
||||
" $.ajax({\r\n url: \'");
|
||||
WriteLiteral(@"
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
alert('Unable to add attachment: ' + textStatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
function buildAttachment(a, canRemove) {
|
||||
var t = '<a><span");
|
||||
|
||||
WriteLiteral(" class=\"icon\"");
|
||||
|
||||
WriteLiteral("><img");
|
||||
|
||||
WriteLiteral(" alt=\"Attachment Thumbnail\"");
|
||||
|
||||
WriteLiteral(" /></span><span");
|
||||
|
||||
WriteLiteral(" class=\"comments\"");
|
||||
|
||||
WriteLiteral("></span><span");
|
||||
|
||||
WriteLiteral(" class=\"author\"");
|
||||
|
||||
WriteLiteral("></span>\';\r\n if (canRemove)\r\n " +
|
||||
" t += \'<span");
|
||||
|
||||
WriteLiteral(" class=\"remove\"");
|
||||
|
||||
WriteLiteral("></span>\';\r\n t += \'<span");
|
||||
|
||||
WriteLiteral(" class=\"timestamp\"");
|
||||
|
||||
WriteLiteral("></span></a>\';\r\n\r\n var e = $(t);\r\n\r\n " +
|
||||
" e.attr(\'data-attachmentid\', a.Id).attr(\'data-mimetype\', a.MimeType).at" +
|
||||
"tr(\'href\', \'");
|
||||
|
||||
|
||||
#line 148 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentRemove()));
|
||||
#line 143 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentDownload()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n success: function" +
|
||||
" (d) {\r\n if (d == \'OK\') {\r\n " +
|
||||
" $this.hide(300).delay(300).queue(function () {\r\n " +
|
||||
" var $this = $(this);\r\n " +
|
||||
" if ($this.attr(\'data-mimetype\').toLowerCase(" +
|
||||
").indexOf(\'image/\') == 0)\r\n S" +
|
||||
"hadowbox.removeCache(this);\r\n $th" +
|
||||
"is.remove();\r\n });\r\n " +
|
||||
" } else {\r\n ale" +
|
||||
"rt(\'Unable to remove attachment: \' + d);\r\n " +
|
||||
" }\r\n $dialogRemoveAttachment.dialog(\"clo" +
|
||||
"se\");\r\n },\r\n " +
|
||||
" error: function (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n\r\n $dialogRem" +
|
||||
"oveAttachment.dialog(\'open\');\r\n\r\n return false;\r\n " +
|
||||
" }\r\n $attachmentOutput.children(\'a\').each(function" +
|
||||
" () {\r\n $this = $(this);\r\n if ($th" +
|
||||
"is.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" $this.shadowbox({ gallery: \'attachments\', player: \'img\', title: $thi" +
|
||||
"s.find(\'.comments\').text() });\r\n });\r\n });\r\n " +
|
||||
" </script>\r\n </td>\r\n </tr>\r\n </table>\r\n <di" +
|
||||
"v");
|
||||
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', \'");
|
||||
|
||||
|
||||
#line 144 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentThumbnail()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"/' + a.Id);
|
||||
e.find('.comments').text(a.Comments);
|
||||
e.find('.author').text(a.Author);
|
||||
e.find('.timestamp').text(a.TimestampFuzzy).attr('title', a.TimestampFull);
|
||||
if (canRemove)
|
||||
e.find('.remove').click(removeAttachment);
|
||||
if (!quick)
|
||||
e.hide();
|
||||
$attachmentOutput.append(e);
|
||||
if (!quick)
|
||||
e.show('slow');
|
||||
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
|
||||
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
|
||||
}
|
||||
|
||||
//#endregion
|
||||
");
|
||||
|
||||
|
||||
#line 160 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 161 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
//#region Remove Attachments
|
||||
|
||||
$attachmentOutput.find('span.remove').click(removeAttachment);
|
||||
|
||||
$('#dialogRemoveAttachment').dialog({
|
||||
resizable: false,
|
||||
height: 140,
|
||||
modal: true,
|
||||
autoOpen: false
|
||||
});
|
||||
|
||||
function removeAttachment() {
|
||||
$this = $(this).closest('a');
|
||||
|
||||
var data = { id: $this.attr('data-attachmentid') };
|
||||
var $dialogRemoveAttachment = $('#dialogRemoveAttachment');
|
||||
$dialogRemoveAttachment.dialog(""enable"");
|
||||
$dialogRemoveAttachment.dialog('option', 'buttons', {
|
||||
""Remove"": function () {
|
||||
$dialogRemoveAttachment.dialog(""disable"");
|
||||
$dialogRemoveAttachment.dialog(""option"", ""buttons"", null);
|
||||
$.ajax({
|
||||
url: '");
|
||||
|
||||
|
||||
#line 185 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Url.Action(MVC.API.User.AttachmentRemove()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n dataType: \'json\',\r\n " +
|
||||
" data: data,\r\n succe" +
|
||||
"ss: function (d) {\r\n if (d == \'OK\') {" +
|
||||
"\r\n $this.hide(300).delay(300).que" +
|
||||
"ue(function () {\r\n var $this " +
|
||||
"= $(this);\r\n if ($this.attr(\'" +
|
||||
"data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
|
||||
" Shadowbox.removeCache(this);\r\n " +
|
||||
" $this.remove();\r\n " +
|
||||
" });\r\n } else {\r\n " +
|
||||
" alert(\'Unable to remove attachment:" +
|
||||
" \' + d);\r\n }\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" },\r\n error: functi" +
|
||||
"on (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
" alert(\'Unable to remove attachment: \' + textStatus);\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n " +
|
||||
" },\r\n Cancel: function () {\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
|
||||
" }\r\n });\r\n\r\n " +
|
||||
" $dialogRemoveAttachment.dialog(\'open\');\r\n\r\n " +
|
||||
" return false;\r\n }\r\n\r\n //#endr" +
|
||||
"egion\r\n ");
|
||||
|
||||
|
||||
#line 218 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"
|
||||
$attachmentOutput.children('a').each(function () {
|
||||
$this = $(this);
|
||||
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
|
||||
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
");
|
||||
|
||||
|
||||
#line 230 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 230 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canAddAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogUpload\"");
|
||||
|
||||
WriteLiteral(" title=\"Upload Attachment\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
WriteLiteral(">\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"silverlightHostUploadAttachment\"");
|
||||
|
||||
WriteLiteral(">\r\n </div>\r\n </div>\r\n <div");
|
||||
WriteLiteral(">\r\n </div>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 236 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 237 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"dialogRemoveAttachment\"");
|
||||
|
||||
WriteLiteral(" title=\"Remove this Attachment?\"");
|
||||
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
WriteLiteral(">\r\n <p>\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"ui-icon ui-icon-alert\"");
|
||||
|
||||
WriteLiteral(" style=\"float: left; margin: 0 7px 20px 0;\"");
|
||||
|
||||
WriteLiteral("></span>\r\n Are you sure?\r\n </p>\r\n </div>\r\n <script>\r\n " +
|
||||
" $(\'#UserDetailTabItems\').append(\'<li><a href=\"#UserDetailTab-Resources\" id=\"" +
|
||||
"UserDetailTab-ResourcesLink\">Attachments [");
|
||||
WriteLiteral("></span>\r\n Are you sure?\r\n </p>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 200 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
#line 245 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <script>\r\n $(\'#UserDetailTabItems\').append(\'<li><a href=\"#UserDetailTa" +
|
||||
"b-Resources\" id=\"UserDetailTab-ResourcesLink\">Attachments [");
|
||||
|
||||
|
||||
#line 247 "..\..\Views\User\UserParts\_Resources.cshtml"
|
||||
Write(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count);
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@model Disco.Web.Models.User.ShowModel
|
||||
@{
|
||||
Authorization.Require(Claims.User.Show);
|
||||
|
||||
var currentDeviceAssignments = Model.User.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue).OrderByDescending(dua => dua.AssignedDate).ToList();
|
||||
}
|
||||
<table id="User_Show_Subjects">
|
||||
@@ -30,15 +32,6 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="User_Show_Details_Category" class="status">
|
||||
<table class="none verticalHeadings">
|
||||
<tr>
|
||||
<td>Type:
|
||||
</td>
|
||||
<td><span id="User_Show_Details_Category_Type" title="Type">@Model.User.Type</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="User_Show_Details_Attributes" class="status">
|
||||
<table class="none verticalHeadings">
|
||||
<tr>
|
||||
@@ -69,29 +62,32 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="User_Show_GenerateDocument_Container" class="status">
|
||||
@Html.DropDownList("User_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.User.GeneratePdf(Model.User.Id, null))?DocumentTemplateId=';
|
||||
var $documentTemplates = $('#User_Show_GenerateDocument');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
window.location.href = generatePdfUrl + v;
|
||||
$documentTemplates.val('').blur();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@if (Authorization.Has(Claims.User.Actions.GenerateDocuments))
|
||||
{
|
||||
<div id="User_Show_GenerateDocument_Container" class="status">
|
||||
@Html.DropDownList("User_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var generatePdfUrl = '@Url.Action(MVC.API.User.GeneratePdf(Model.User.Id, null))?DocumentTemplateId=';
|
||||
var $documentTemplates = $('#User_Show_GenerateDocument');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
window.location.href = generatePdfUrl + v;
|
||||
$documentTemplates.val('').blur();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
}
|
||||
<div id="User_Show_Details_Actions">
|
||||
@{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
}
|
||||
@Html.ActionLinkSmallButton("Create Job", MVC.Job.Create(Model.PrimaryDeviceSerialNumber, Model.User.Id), "User_Show_Details_Actions_CreateJob_Button")
|
||||
@if (currentDeviceAssignments.Count > 1)
|
||||
@if (Authorization.Has(Claims.Job.Actions.Create))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
@Html.ActionLinkSmallButton("Create Job", MVC.Job.Create(Model.PrimaryDeviceSerialNumber, Model.User.Id), "User_Show_Details_Actions_CreateJob_Button")
|
||||
if (currentDeviceAssignments.Count > 1)
|
||||
{
|
||||
<div id="User_Show_Details_Actions_CreateJob_Dialog" class="dialog" title="Create Job for Which Device?">
|
||||
<div class="clearfix">
|
||||
<span class="ui-icon ui-icon-info" style="float: left; margin: 0 7px 20px 0;"></span>
|
||||
@@ -183,9 +179,9 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
<script>
|
||||
$(function () {
|
||||
$('#User_Show_Details_Actions_CreateJob_Button').click(function () {
|
||||
@@ -198,6 +194,7 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -211,9 +208,16 @@
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
{
|
||||
<div class="User_Show_AssignedDevices_CurrentAssignment clearfix" data-deviceserialnumber="@assignment.DeviceSerialNumber">
|
||||
<a href="@Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))">
|
||||
@if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
<a href="@Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))">
|
||||
<img class="User_Show_AssignedDevices_CurrentAssignment_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))" />
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<img class="User_Show_AssignedDevices_CurrentAssignment_Image" alt="Model Image" src="@Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))" />
|
||||
</a>
|
||||
}
|
||||
<div class="User_Show_AssignedDevices_CurrentAssignment_Details">
|
||||
<table class="none">
|
||||
<tbody>
|
||||
@@ -221,7 +225,16 @@
|
||||
<td>Serial Number:
|
||||
</td>
|
||||
<td>
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_SerialNumber">@Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber))</span> (<span>@assignment.Device.ComputerName</span>)
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_SerialNumber">
|
||||
@if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
@Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
}
|
||||
else
|
||||
{
|
||||
@assignment.Device.SerialNumber
|
||||
}
|
||||
</span>(<span>@assignment.Device.ComputerName</span>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18033
|
||||
// Runtime Version:4.0.30319.18051
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -28,12 +28,14 @@ namespace Disco.Web.Views.User.UserParts
|
||||
using System.Web.WebPages;
|
||||
using Disco.BI.Extensions;
|
||||
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("~/Views/User/UserParts/_Subject.cshtml")]
|
||||
public partial class Subject : System.Web.Mvc.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
public partial class Subject : Disco.Services.Web.WebViewPage<Disco.Web.Models.User.ShowModel>
|
||||
{
|
||||
public Subject()
|
||||
{
|
||||
@@ -43,6 +45,8 @@ namespace Disco.Web.Views.User.UserParts
|
||||
|
||||
#line 2 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
Authorization.Require(Claims.User.Show);
|
||||
|
||||
var currentDeviceAssignments = Model.User.DeviceUserAssignments.Where(dua => !dua.UnassignedDate.HasValue).OrderByDescending(dua => dua.AssignedDate).ToList();
|
||||
|
||||
|
||||
@@ -75,7 +79,7 @@ WriteLiteral(" title=\"Username\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 16 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 18 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.Id);
|
||||
|
||||
|
||||
@@ -92,7 +96,7 @@ WriteLiteral(" title=\"Display Name\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 21 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 23 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.DisplayName);
|
||||
|
||||
|
||||
@@ -109,7 +113,7 @@ WriteLiteral(" title=\"Given Name\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 25 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 27 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.GivenName);
|
||||
|
||||
|
||||
@@ -126,7 +130,7 @@ WriteLiteral(" title=\"Surname\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 29 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 31 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.Surname);
|
||||
|
||||
|
||||
@@ -135,33 +139,6 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span></td>\r\n </tr>\r\n </table>" +
|
||||
"\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Details_Category\"");
|
||||
|
||||
WriteLiteral(" class=\"status\"");
|
||||
|
||||
WriteLiteral(">\r\n <table");
|
||||
|
||||
WriteLiteral(" class=\"none verticalHeadings\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <td>Type:\r\n " +
|
||||
" </td>\r\n <td><span");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Details_Category_Type\"");
|
||||
|
||||
WriteLiteral(" title=\"Type\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 38 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.Type);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span></td>\r\n </tr>\r\n </table>" +
|
||||
"\r\n </div>\r\n <div");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Details_Attributes\"");
|
||||
|
||||
WriteLiteral(" class=\"status\"");
|
||||
@@ -174,13 +151,13 @@ WriteLiteral(">\r\n <tr>\r\n
|
||||
"td>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 40 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 40 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(Model.User.EmailAddress))
|
||||
{
|
||||
|
||||
@@ -196,7 +173,7 @@ WriteLiteral(" title=\"Email Address [Update in Active Directory]\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 42 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.EmailAddress);
|
||||
|
||||
|
||||
@@ -205,7 +182,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 43 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -220,7 +197,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 54 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 47 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -231,13 +208,13 @@ WriteLiteral(" </td>\r\n
|
||||
" <td>\r\n");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 53 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 60 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 53 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(Model.User.PhoneNumber))
|
||||
{
|
||||
|
||||
@@ -253,7 +230,7 @@ WriteLiteral(" title=\"Phone Number [Update in Active Directory]\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 62 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 55 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Model.User.PhoneNumber);
|
||||
|
||||
|
||||
@@ -262,7 +239,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 56 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -277,14 +254,30 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 60 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n " +
|
||||
" </table>\r\n </div>\r\n <div");
|
||||
" </table>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 65 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 65 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.User.Actions.GenerateDocuments))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_GenerateDocument_Container\"");
|
||||
|
||||
@@ -292,84 +285,83 @@ WriteLiteral(" class=\"status\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 73 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.DropDownList("User_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems));
|
||||
#line 68 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.DropDownList("User_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n <script");
|
||||
WriteLiteral("\r\n <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(">\r\n $(function () {\r\n v" +
|
||||
"ar generatePdfUrl = \'");
|
||||
WriteLiteral(">\r\n $(function () {\r\n " +
|
||||
" var generatePdfUrl = \'");
|
||||
|
||||
|
||||
#line 76 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Url.Action(MVC.API.User.GeneratePdf(Model.User.Id, null)));
|
||||
#line 71 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Url.Action(MVC.API.User.GeneratePdf(Model.User.Id, null)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(@"?DocumentTemplateId=';
|
||||
var $documentTemplates = $('#User_Show_GenerateDocument');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
window.location.href = generatePdfUrl + v;
|
||||
$documentTemplates.val('').blur();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div");
|
||||
var $documentTemplates = $('#User_Show_GenerateDocument');
|
||||
$documentTemplates.change(function () {
|
||||
var v = $documentTemplates.val();
|
||||
if (v) {
|
||||
window.location.href = generatePdfUrl + v;
|
||||
$documentTemplates.val('').blur();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Details_Actions\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 89 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 85 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 89 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 92 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Create Job", MVC.Job.Create(Model.PrimaryDeviceSerialNumber, Model.User.Id), "User_Show_Details_Actions_CreateJob_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 93 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 93 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (currentDeviceAssignments.Count > 1)
|
||||
#line 85 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Job.Actions.Create))
|
||||
{
|
||||
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLinkSmallButton("Create Job", MVC.Job.Create(Model.PrimaryDeviceSerialNumber, Model.User.Id), "User_Show_Details_Actions_CreateJob_Button"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 88 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
if (currentDeviceAssignments.Count > 1)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -405,13 +397,13 @@ WriteLiteral(" class=\"none\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 102 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 98 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 102 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 98 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
{
|
||||
|
||||
@@ -425,7 +417,7 @@ WriteLiteral(" class=\"CreateJob_Assignment clearfix\"");
|
||||
WriteLiteral(" data-createjoburl=\"");
|
||||
|
||||
|
||||
#line 104 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 100 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Url.Action(MVC.Job.Create(assignment.DeviceSerialNumber, Model.User.Id)));
|
||||
|
||||
|
||||
@@ -439,14 +431,14 @@ WriteLiteral(" class=\"CreateJob_Assignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 6326), Tuple.Create("\"", 6447)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 6191), Tuple.Create("\"", 6312)
|
||||
|
||||
#line 105 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6332), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 101 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6197), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6332), false)
|
||||
, 6197), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n <div");
|
||||
@@ -466,7 +458,7 @@ WriteLiteral(@">
|
||||
<span>");
|
||||
|
||||
|
||||
#line 113 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 109 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.SerialNumber);
|
||||
|
||||
|
||||
@@ -475,7 +467,7 @@ WriteLiteral(@">
|
||||
WriteLiteral("</span> (<span>");
|
||||
|
||||
|
||||
#line 113 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 109 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
|
||||
|
||||
@@ -491,7 +483,7 @@ WriteLiteral(@"</span>)
|
||||
<span>");
|
||||
|
||||
|
||||
#line 120 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 116 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
@@ -506,13 +498,13 @@ WriteLiteral(@"</span>
|
||||
");
|
||||
|
||||
|
||||
#line 126 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 122 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 126 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 122 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
|
||||
@@ -522,7 +514,7 @@ WriteLiteral(@"</span>
|
||||
WriteLiteral(" <span>");
|
||||
|
||||
|
||||
#line 128 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 124 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.AssetNumber);
|
||||
|
||||
|
||||
@@ -531,7 +523,7 @@ WriteLiteral("
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 129 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 125 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -546,7 +538,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 133 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 129 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -560,7 +552,7 @@ WriteLiteral(@" <
|
||||
<span>");
|
||||
|
||||
|
||||
#line 139 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 135 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
|
||||
|
||||
|
||||
@@ -576,7 +568,7 @@ WriteLiteral(@"</span>
|
||||
");
|
||||
|
||||
|
||||
#line 146 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 142 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -613,10 +605,10 @@ WriteLiteral(" <script>\r\n
|
||||
"ipt>\r\n");
|
||||
|
||||
|
||||
#line 186 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
#line 182 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -636,7 +628,8 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 201 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 197 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -654,13 +647,13 @@ WriteLiteral(" id=\"User_Show_AssignedDevices_Active\"");
|
||||
WriteLiteral(">\r\n <h3>Current Device Assignments</h3>\r\n");
|
||||
|
||||
|
||||
#line 209 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 206 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 209 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 206 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (currentDeviceAssignments.Count > 0)
|
||||
{
|
||||
foreach (var assignment in currentDeviceAssignments)
|
||||
@@ -676,7 +669,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment clearfix\"");
|
||||
WriteLiteral(" data-deviceserialnumber=\"");
|
||||
|
||||
|
||||
#line 213 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 210 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.DeviceSerialNumber);
|
||||
|
||||
|
||||
@@ -684,35 +677,87 @@ WriteLiteral(" data-deviceserialnumber=\"");
|
||||
#line hidden
|
||||
WriteLiteral("\"");
|
||||
|
||||
WriteLiteral(">\r\n <a");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 13160), Tuple.Create("\"", 13227)
|
||||
|
||||
#line 214 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13167), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
#line 211 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 13167), false)
|
||||
|
||||
#line 211 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 13184), Tuple.Create("\"", 13251)
|
||||
|
||||
#line 213 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13191), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 13191), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <img");
|
||||
WriteLiteral(">\r\n <img");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 13347), Tuple.Create("\"", 13468)
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 13375), Tuple.Create("\"", 13496)
|
||||
|
||||
#line 215 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13353), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
#line 214 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13381), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 13353), false)
|
||||
, 13381), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n </a>\r\n <div");
|
||||
WriteLiteral(" />\r\n </a>\r\n");
|
||||
|
||||
|
||||
#line 216 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <img");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
|
||||
|
||||
WriteLiteral(" alt=\"Model Image\"");
|
||||
|
||||
WriteAttribute("src", Tuple.Create(" src=\"", 13768), Tuple.Create("\"", 13889)
|
||||
|
||||
#line 219 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 13774), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 13774), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" />\r\n");
|
||||
|
||||
|
||||
#line 220 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Details\"");
|
||||
|
||||
@@ -730,20 +775,59 @@ WriteLiteral(@">
|
||||
|
||||
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_SerialNumber\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 224 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber)));
|
||||
#line 229 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 229 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (Authorization.Has(Claims.Device.Show))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 231 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span> (<span>");
|
||||
|
||||
#line 231 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 235 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.SerialNumber);
|
||||
|
||||
|
||||
#line 224 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 235 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </span>(<span>");
|
||||
|
||||
|
||||
#line 237 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.ComputerName);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -762,7 +846,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Model\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 231 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 244 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.DeviceModel.ToString());
|
||||
|
||||
|
||||
@@ -777,13 +861,13 @@ WriteLiteral(@"</span>
|
||||
");
|
||||
|
||||
|
||||
#line 237 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 250 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 237 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 250 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
|
||||
{
|
||||
|
||||
@@ -797,7 +881,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Asset\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 239 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 252 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(assignment.Device.AssetNumber);
|
||||
|
||||
|
||||
@@ -806,7 +890,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 240 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 253 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -821,7 +905,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">Unknown</span>\r\n");
|
||||
|
||||
|
||||
#line 244 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 257 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -839,7 +923,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Assigned\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 250 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 263 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
|
||||
|
||||
|
||||
@@ -855,7 +939,7 @@ WriteLiteral(@"</span>
|
||||
");
|
||||
|
||||
|
||||
#line 257 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 270 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -871,7 +955,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Current Device Assignments</span>\r\n");
|
||||
|
||||
|
||||
#line 262 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
#line 275 "..\..\Views\User\UserParts\_Subject.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user