maintenance unify document generation ui

This commit is contained in:
Gary Sharp
2021-01-13 15:41:51 +11:00
parent 806aadd161
commit f7fdfb0c8a
37 changed files with 1975 additions and 1973 deletions
@@ -1,5 +1,7 @@
using Disco.Data.Repository;
using Disco.Models.Repository;
using Disco.Services.Interop.ActiveDirectory;
using Disco.Services.Users;
using System;
using System.Drawing;
using System.IO;
@@ -82,6 +84,43 @@ namespace Disco.Services
return null;
}
public static IAttachmentTarget ResolveScopeTarget(this AttachmentTypes scope, DiscoDataContext database, string targetId)
{
if (database == null)
throw new ArgumentNullException(nameof(database));
if (string.IsNullOrWhiteSpace(targetId))
throw new ArgumentNullException(nameof(targetId));
switch (scope)
{
case AttachmentTypes.Device:
return database.Devices.Find(targetId);
case AttachmentTypes.Job:
if (!int.TryParse(targetId, out var targetIdInt))
throw new ArgumentOutOfRangeException(nameof(targetId));
return database.Jobs.Find(targetIdInt);
case AttachmentTypes.User:
// special usecase in resolving users (they may not exist in the database yet)
targetId = ActiveDirectory.ParseDomainAccountId(targetId);
var target = database.Users.Find(targetId);
if (target == null)
{
// try importing user
target = UserService.GetUser(targetId, database, true);
}
return target;
default:
throw new InvalidOperationException("Unexpected DocumentType Scope");
}
}
public static IAttachmentTarget ResolveScopeTarget(this DocumentTemplate template, DiscoDataContext database, string targetId)
{
if (template == null)
throw new ArgumentNullException(nameof(template));
return ResolveScopeTarget(template.AttachmentType, database, targetId);
}
}
}
@@ -139,5 +139,13 @@ namespace Disco.Services
return null;
}
public static IAttachmentTarget ResolveScopeTarget(this DocumentTemplatePackage templatePackage, DiscoDataContext database, string targetId)
{
if (templatePackage == null)
throw new ArgumentNullException(nameof(templatePackage));
return templatePackage.Scope.ResolveScopeTarget(database, targetId);
}
}
}
@@ -386,30 +386,8 @@ namespace Disco.Web.Areas.API.Controllers
if (string.IsNullOrEmpty(DocumentTemplateId))
throw new ArgumentNullException(nameof(DocumentTemplateId));
var device = Database.Devices.Find(id);
if (device != null)
{
var documentTemplate = Database.DocumentTemplates.Find(DocumentTemplateId);
if (documentTemplate != null)
{
var timeStamp = DateTime.Now;
Stream pdf;
using (var generationState = DocumentState.DefaultState())
{
pdf = documentTemplate.GeneratePdf(Database, device, UserService.CurrentUser, timeStamp, generationState);
}
Database.SaveChanges();
return File(pdf, "application/pdf", string.Format("{0}_{1}_{2:yyyyMMdd-HHmmss}.pdf", documentTemplate.Id, device.SerialNumber, timeStamp));
}
else
{
throw new ArgumentException("Invalid Document Template Id", nameof(DocumentTemplateId));
}
}
else
{
throw new ArgumentException("Invalid Serial Number", nameof(id));
}
// Obsolete: Use API\DocumentTemplate\Generate instead
return RedirectToAction(MVC.API.DocumentTemplate.Generate(DocumentTemplateId, id));
}
[DiscoAuthorize(Claims.Device.Actions.GenerateDocuments)]
@@ -420,33 +398,8 @@ namespace Disco.Web.Areas.API.Controllers
if (string.IsNullOrEmpty(DocumentTemplatePackageId))
throw new ArgumentNullException(nameof(DocumentTemplatePackageId));
var device = Database.Devices.Find(id);
if (device != null)
{
var package = DocumentTemplatePackages.GetPackage(DocumentTemplatePackageId);
if (package != null)
{
if (package.Scope != AttachmentTypes.Device)
throw new ArgumentException("This package cannot be generated from the Device Scope", nameof(DocumentTemplatePackageId));
var timeStamp = DateTime.Now;
Stream pdf;
using (var generationState = DocumentState.DefaultState())
{
pdf = package.GeneratePdfPackage(Database, device, UserService.CurrentUser, timeStamp, generationState);
}
Database.SaveChanges();
return File(pdf, "application/pdf", string.Format("{0}_{1}_{2:yyyyMMdd-HHmmss}.pdf", package.Id, device.SerialNumber, timeStamp));
}
else
{
throw new ArgumentException("Invalid Document Template Package Id", nameof(DocumentTemplatePackageId));
}
}
else
{
throw new ArgumentException("Invalid Serial Number", nameof(id));
}
// Obsolete: Use API\DocumentTemplatePackage\Generate instead
return RedirectToAction(MVC.API.DocumentTemplatePackage.Generate(DocumentTemplatePackageId, id));
}
[DiscoAuthorize(Claims.Device.Show)]
@@ -1,5 +1,6 @@
using Disco.BI.Extensions;
using Disco.Models.Repository;
using Disco.Models.Services.Documents;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Documents;
@@ -691,6 +692,51 @@ namespace Disco.Web.Areas.API.Controllers
return File(pdf, "application/pdf", string.Format("{0}_Bulk_{1:yyyyMMdd-HHmmss}.pdf", documentTemplate.Id, timeStamp));
}
public virtual ActionResult Generate(string id, string TargetId)
{
if (string.IsNullOrWhiteSpace(id))
throw new ArgumentNullException(nameof(id));
if (string.IsNullOrWhiteSpace(TargetId))
throw new ArgumentNullException(nameof(TargetId));
// get template
var template = Database.DocumentTemplates.Find(id);
if (template == null)
throw new ArgumentException("Invalid document template id", nameof(id));
// validate authorization
switch (template.Scope)
{
case DocumentTemplate.DocumentTemplateScopes.Device:
Authorization.Require(Claims.Device.Actions.GenerateDocuments);
break;
case DocumentTemplate.DocumentTemplateScopes.Job:
Authorization.Require(Claims.Job.Actions.GenerateDocuments);
break;
case DocumentTemplate.DocumentTemplateScopes.User:
Authorization.Require(Claims.User.Actions.GenerateDocuments);
break;
default:
throw new InvalidOperationException("Unknown DocumentType Scope");
}
// resolve target
var target = template.ResolveScopeTarget(Database, TargetId);
if (target == null)
throw new ArgumentException("Target not found", nameof(TargetId));
// generate document
var timestamp = DateTime.Now;
var document = default(Stream);
using (var state = DocumentState.DefaultState())
{
document = template.GeneratePdf(Database, target, UserService.CurrentUser, timestamp, state);
}
Database.SaveChanges();
return File(document, "application/pdf", $"{template.Id}_{target.AttachmentReferenceId.Replace('\\', '_')}_{timestamp:yyyyMMdd-HHmmss}.pdf");
}
[DiscoAuthorize(Claims.Config.DocumentTemplate.Delete)]
public virtual ActionResult Delete(string id, bool? redirect = false)
{
@@ -8,6 +8,8 @@ using Disco.Services.Users;
using Disco.Services.Web;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
@@ -384,6 +386,48 @@ namespace Disco.Web.Areas.API.Controllers
return File(pdf, "application/pdf", string.Format("{0}_Bulk_{1:yyyyMMdd-HHmmss}.pdf", package.Id, timeStamp));
}
public virtual ActionResult Generate(string id, string TargetId)
{
if (string.IsNullOrWhiteSpace(id))
throw new ArgumentNullException(nameof(id));
if (string.IsNullOrWhiteSpace(TargetId))
throw new ArgumentNullException(nameof(TargetId));
var package = DocumentTemplatePackages.GetPackage(id);
if (package == null)
throw new ArgumentException("Invalid document template package id", nameof(id));
switch (package.Scope)
{
case AttachmentTypes.Device:
Authorization.Require(Claims.Device.Actions.GenerateDocuments);
break;
case AttachmentTypes.Job:
Authorization.Require(Claims.Job.Actions.GenerateDocuments);
break;
case AttachmentTypes.User:
Authorization.Require(Claims.User.Actions.GenerateDocuments);
break;
default:
throw new InvalidOperationException("Unknown document type scope");
}
// resolve target
var target = package.ResolveScopeTarget(Database, TargetId);
if (target == null)
throw new ArgumentException("Target not found", nameof(TargetId));
var timestamp = DateTime.Now;
var document = default(Stream);
using (var state = DocumentState.DefaultState())
{
document = package.GeneratePdfPackage(Database, target, UserService.CurrentUser, timestamp, state);
}
Database.SaveChanges();
return File(document, "application/pdf", $"{package.Id}_{target.AttachmentReferenceId.Replace('\\', '_')}_{timestamp:yyyyMMdd-HHmmss}.pdf");
}
[DiscoAuthorize(Claims.Config.DocumentTemplate.Delete)]
public virtual ActionResult Delete(string id, bool? redirect = false)
{
@@ -2093,30 +2093,9 @@ namespace Disco.Web.Areas.API.Controllers
throw new ArgumentOutOfRangeException(nameof(id));
if (string.IsNullOrEmpty(DocumentTemplateId))
throw new ArgumentNullException(nameof(DocumentTemplateId));
var job = Database.Jobs.Find(id);
if (job != null)
{
var documentTemplate = Database.DocumentTemplates.Find(DocumentTemplateId);
if (documentTemplate != null)
{
var timeStamp = DateTime.Now;
Stream pdf;
using (var generationState = DocumentState.DefaultState())
{
pdf = documentTemplate.GeneratePdf(Database, job, CurrentUser, timeStamp, generationState);
}
Database.SaveChanges();
return File(pdf, "application/pdf", string.Format("{0}_{1}_{2:yyyyMMdd-HHmmss}.pdf", documentTemplate.Id, job.Id, timeStamp));
}
else
{
throw new ArgumentException("Invalid Document Template Id", "id");
}
}
else
{
throw new ArgumentException("Invalid Job Id", "id");
}
// Obsolete: Use API\DocumentTemplate\Generate instead
return RedirectToAction(MVC.API.DocumentTemplate.Generate(DocumentTemplateId, id.ToString()));
}
[DiscoAuthorize(Claims.Job.Actions.GenerateDocuments)]
@@ -2127,34 +2106,8 @@ namespace Disco.Web.Areas.API.Controllers
if (string.IsNullOrEmpty(DocumentTemplatePackageId))
throw new ArgumentNullException(nameof(DocumentTemplatePackageId));
var job = Database.Jobs.Find(id);
if (job != null)
{
var package = DocumentTemplatePackages.GetPackage(DocumentTemplatePackageId);
if (package != null)
{
if (package.Scope != AttachmentTypes.Job)
throw new ArgumentException("This package cannot be generated from the Job Scope", nameof(DocumentTemplatePackageId));
var timeStamp = DateTime.Now;
Stream pdf;
using (var generationState = DocumentState.DefaultState())
{
pdf = package.GeneratePdfPackage(Database, job, UserService.CurrentUser, timeStamp, generationState);
}
Database.SaveChanges();
return File(pdf, "application/pdf", string.Format("{0}_{1}_{2:yyyyMMdd-HHmmss}.pdf", package.Id, job.Id, timeStamp));
}
else
{
throw new ArgumentException("Invalid Document Template Package Id", nameof(DocumentTemplatePackageId));
}
}
else
{
throw new ArgumentException("Invalid Job Id", nameof(id));
}
// Obsolete: Use API\DocumentTemplatePackage\Generate instead
return RedirectToAction(MVC.API.DocumentTemplatePackage.Generate(DocumentTemplatePackageId, id.ToString()));
}
[DiscoAuthorize(Claims.Job.Properties.DeviceHeldLocation)]
@@ -166,40 +166,12 @@ namespace Disco.Web.Areas.API.Controllers
if (string.IsNullOrEmpty(DocumentTemplateId))
throw new ArgumentNullException(nameof(DocumentTemplateId));
id = ActiveDirectory.ParseDomainAccountId(id, Domain);
var userId = ActiveDirectory.ParseDomainAccountId(id, Domain);
var user = Database.Users.Find(id);
if (user == null)
{
// Try importing the user
user = UserService.GetUser(id, Database, true);
// Obsolete: Use API\DocumentTemplate\Generate instead
return RedirectToAction(MVC.API.DocumentTemplate.Generate(DocumentTemplateId, userId));
}
if (user != null)
{
var documentTemplate = Database.DocumentTemplates.Find(DocumentTemplateId);
if (documentTemplate != null)
{
var timeStamp = DateTime.Now;
Stream pdf;
using (var generationState = DocumentState.DefaultState())
{
pdf = documentTemplate.GeneratePdf(Database, user, UserService.CurrentUser, timeStamp, generationState);
}
Database.SaveChanges();
return File(pdf, "application/pdf", string.Format("{0}_{1}_{2:yyyyMMdd-HHmmss}.pdf", documentTemplate.Id, user.UserId, timeStamp));
}
else
{
throw new ArgumentException("Invalid Document Template Id", "id");
}
}
else
{
throw new ArgumentException("Invalid User Id", "id");
}
}
[DiscoAuthorize(Claims.User.Actions.GenerateDocuments)]
public virtual ActionResult GeneratePdfPackage(string id, string Domain, string DocumentTemplatePackageId)
{
@@ -208,35 +180,10 @@ namespace Disco.Web.Areas.API.Controllers
if (string.IsNullOrEmpty(DocumentTemplatePackageId))
throw new ArgumentNullException(nameof(DocumentTemplatePackageId));
id = ActiveDirectory.ParseDomainAccountId(id, Domain);
var userId = ActiveDirectory.ParseDomainAccountId(id, Domain);
var user = Database.Users.Find(id);
if (user != null)
{
var package = DocumentTemplatePackages.GetPackage(DocumentTemplatePackageId);
if (package != null)
{
if (package.Scope != AttachmentTypes.User)
throw new ArgumentException("This package cannot be generated from the User Scope", nameof(DocumentTemplatePackageId));
var timeStamp = DateTime.Now;
Stream pdf;
using (var generationState = DocumentState.DefaultState())
{
pdf = package.GeneratePdfPackage(Database, user, UserService.CurrentUser, timeStamp, generationState);
}
Database.SaveChanges();
return File(pdf, "application/pdf", string.Format("{0}_{1}_{2:yyyyMMdd-HHmmss}.pdf", package.Id, user.UserId, timeStamp));
}
else
{
throw new ArgumentException("Invalid Document Template Package Id", nameof(DocumentTemplatePackageId));
}
}
else
{
throw new ArgumentException("Invalid User Id", nameof(id));
}
// Obsolete: Use API\DocumentTemplatePackage\Generate instead
return RedirectToAction(MVC.API.DocumentTemplatePackage.Generate(DocumentTemplatePackageId, userId));
}
}
+106 -103
View File
@@ -437,7 +437,7 @@ th {
cursor: pointer;
position: relative;
margin-top: 2px;
padding: .5em .5em .5em .7em;
padding: 0.5em 0.5em 0.5em 0.7em;
min-height: 0;
/* support: IE7 */
}
@@ -445,14 +445,14 @@ th {
padding-left: 2.2em;
}
.ui-accordion .ui-accordion-noicons {
padding-left: .7em;
padding-left: 0.7em;
}
.ui-accordion .ui-accordion-icons .ui-accordion-icons {
padding-left: 2.2em;
}
.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
position: absolute;
left: .5em;
left: 0.5em;
top: 50%;
margin-top: -8px;
}
@@ -472,7 +472,7 @@ th {
position: relative;
padding: 0;
line-height: normal;
margin-right: .1em;
margin-right: 0.1em;
cursor: pointer;
vertical-align: middle;
text-align: center;
@@ -506,20 +506,20 @@ button.ui-button-icons-only {
line-height: normal;
}
.ui-button-text-only .ui-button-text {
padding: .4em 1em;
padding: 0.4em 1em;
}
.ui-button-icon-only .ui-button-text,
.ui-button-icons-only .ui-button-text {
padding: .4em;
padding: 0.4em;
text-indent: -9999999px;
}
.ui-button-text-icon-primary .ui-button-text,
.ui-button-text-icons .ui-button-text {
padding: .4em 1em .4em 2.1em;
padding: 0.4em 1em 0.4em 2.1em;
}
.ui-button-text-icon-secondary .ui-button-text,
.ui-button-text-icons .ui-button-text {
padding: .4em 2.1em .4em 1em;
padding: 0.4em 2.1em 0.4em 1em;
}
.ui-button-text-icons .ui-button-text {
padding-left: 2.1em;
@@ -527,7 +527,7 @@ button.ui-button-icons-only {
}
/* no icon support for input elements, provide padding by default */
input.ui-button {
padding: .4em 1em;
padding: 0.4em 1em;
}
/* button icon element(s) */
.ui-button-icon-only .ui-icon,
@@ -546,12 +546,12 @@ input.ui-button {
.ui-button-text-icon-primary .ui-button-icon-primary,
.ui-button-text-icons .ui-button-icon-primary,
.ui-button-icons-only .ui-button-icon-primary {
left: .5em;
left: 0.5em;
}
.ui-button-text-icon-secondary .ui-button-icon-secondary,
.ui-button-text-icons .ui-button-icon-secondary,
.ui-button-icons-only .ui-button-icon-secondary {
right: .5em;
right: 0.5em;
}
/* button sets */
.ui-buttonset {
@@ -570,12 +570,12 @@ button.ui-button::-moz-focus-inner {
}
.ui-datepicker {
width: 17em;
padding: .2em .2em 0;
padding: 0.2em 0.2em 0;
display: none;
}
.ui-datepicker .ui-datepicker-header {
position: relative;
padding: .2em 0;
padding: 0.2em 0;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
@@ -624,12 +624,12 @@ button.ui-button::-moz-focus-inner {
}
.ui-datepicker table {
width: 100%;
font-size: .9em;
font-size: 0.9em;
border-collapse: collapse;
margin: 0 0 .4em;
margin: 0 0 0.4em;
}
.ui-datepicker th {
padding: .7em .3em;
padding: 0.7em 0.3em;
text-align: center;
font-weight: bold;
border: 0;
@@ -641,23 +641,23 @@ button.ui-button::-moz-focus-inner {
.ui-datepicker td span,
.ui-datepicker td a {
display: block;
padding: .2em;
padding: 0.2em;
text-align: right;
text-decoration: none;
}
.ui-datepicker .ui-datepicker-buttonpane {
background-image: none;
margin: .7em 0 0 0;
padding: 0 .2em;
margin: 0.7em 0 0 0;
padding: 0 0.2em;
border-left: 0;
border-right: 0;
border-bottom: 0;
}
.ui-datepicker .ui-datepicker-buttonpane button {
float: right;
margin: .5em .2em .4em;
margin: 0.5em 0.2em 0.4em;
cursor: pointer;
padding: .2em .6em .3em .6em;
padding: 0.2em 0.6em 0.3em 0.6em;
width: auto;
overflow: visible;
}
@@ -673,7 +673,7 @@ button.ui-button::-moz-focus-inner {
}
.ui-datepicker-multi .ui-datepicker-group table {
width: 95%;
margin: 0 auto .4em;
margin: 0 auto 0.4em;
}
.ui-datepicker-multi-2 .ui-datepicker-group {
width: 50%;
@@ -736,16 +736,16 @@ button.ui-button::-moz-focus-inner {
position: absolute;
top: 0;
left: 0;
padding: .2em;
padding: 0.2em;
outline: 0;
}
.ui-dialog .ui-dialog-titlebar {
padding: .4em 1em;
padding: 0.4em 1em;
position: relative;
}
.ui-dialog .ui-dialog-title {
float: left;
margin: .1em 0;
margin: 0.1em 0;
white-space: nowrap;
width: 90%;
overflow: hidden;
@@ -753,7 +753,7 @@ button.ui-button::-moz-focus-inner {
}
.ui-dialog .ui-dialog-titlebar-close {
position: absolute;
right: .3em;
right: 0.3em;
top: 50%;
width: 20px;
margin: -10px 0 0 0;
@@ -763,7 +763,7 @@ button.ui-button::-moz-focus-inner {
.ui-dialog .ui-dialog-content {
position: relative;
border: 0;
padding: .5em 1em;
padding: 0.5em 1em;
background: none;
overflow: auto;
}
@@ -771,14 +771,14 @@ button.ui-button::-moz-focus-inner {
text-align: left;
border-width: 1px 0 0 0;
background-image: none;
margin-top: .5em;
padding: .3em 1em .5em .4em;
margin-top: 0.5em;
padding: 0.3em 1em 0.5em 0.4em;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: right;
}
.ui-dialog .ui-dialog-buttonpane button {
margin: .5em .4em .5em 0;
margin: 0.5em 0.4em 0.5em 0;
cursor: pointer;
}
.ui-dialog .ui-resizable-se {
@@ -819,7 +819,7 @@ button.ui-button::-moz-focus-inner {
.ui-menu .ui-menu-item a {
text-decoration: none;
display: block;
padding: 2px .4em;
padding: 2px 0.4em;
line-height: 1.5;
min-height: 0;
/* support: IE7 */
@@ -832,7 +832,7 @@ button.ui-button::-moz-focus-inner {
}
.ui-menu .ui-state-disabled {
font-weight: normal;
margin: .4em 0 .2em;
margin: 0.4em 0 0.2em;
line-height: 1.5;
}
.ui-menu .ui-state-disabled a {
@@ -849,8 +849,8 @@ button.ui-button::-moz-focus-inner {
/* left-aligned */
.ui-menu .ui-icon {
position: absolute;
top: .2em;
left: .2em;
top: 0.2em;
left: 0.2em;
}
/* right-aligned */
.ui-menu .ui-menu-icon {
@@ -962,7 +962,7 @@ button.ui-button::-moz-focus-inner {
.ui-slider .ui-slider-range {
position: absolute;
z-index: 1;
font-size: .7em;
font-size: 0.7em;
display: block;
border: 0;
background-position: 0 0;
@@ -973,7 +973,7 @@ button.ui-button::-moz-focus-inner {
filter: inherit;
}
.ui-slider-horizontal {
height: .8em;
height: 0.8em;
}
.ui-slider-horizontal .ui-slider-handle {
top: -0.3em;
@@ -990,7 +990,7 @@ button.ui-button::-moz-focus-inner {
right: 0;
}
.ui-slider-vertical {
width: .8em;
width: 0.8em;
height: 100px;
}
.ui-slider-vertical .ui-slider-handle {
@@ -1020,15 +1020,15 @@ button.ui-button::-moz-focus-inner {
background: none;
color: inherit;
padding: 0;
margin: .2em 0;
margin: 0.2em 0;
vertical-align: middle;
margin-left: .4em;
margin-left: 0.4em;
margin-right: 22px;
}
.ui-spinner-button {
width: 16px;
height: 50%;
font-size: .5em;
font-size: 0.5em;
padding: 0;
margin: 0;
text-align: center;
@@ -1065,25 +1065,25 @@ button.ui-button::-moz-focus-inner {
.ui-tabs {
position: relative;
/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
padding: .2em;
padding: 0.2em;
}
.ui-tabs .ui-tabs-nav {
margin: 0;
padding: .2em .2em 0;
padding: 0.2em 0.2em 0;
}
.ui-tabs .ui-tabs-nav li {
list-style: none;
float: left;
position: relative;
top: 0;
margin: 1px .2em 0 0;
margin: 1px 0.2em 0 0;
border-bottom-width: 0;
padding: 0;
white-space: nowrap;
}
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
float: left;
padding: .5em 1em;
padding: 0.5em 1em;
text-decoration: none;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
@@ -1239,14 +1239,14 @@ body .ui-tooltip {
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
opacity: 0.7;
filter: alpha(opacity=70);
font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
opacity: 0.35;
filter: alpha(opacity=35);
background-image: none;
}
@@ -1862,7 +1862,7 @@ body .ui-tooltip {
background-color: #fff;
}
.tableData > tbody > tr:nth-child(odd) > td {
background-color: #fbfbfb;
background-color: hsl(0, 0%, 98.5%);
}
.tableData > thead > tr > th,
.tableData > tbody > tr > th {
@@ -1870,7 +1870,7 @@ body .ui-tooltip {
border: solid 1px #f4f4f4;
}
.tableData > tbody > tr:hover > td {
background-color: #f9f9f9;
background-color: hsl(0, 0%, 97.5%);
}
.tableData > tfoot > tr > th,
.tableData > tfoot > tr > td {
@@ -1966,7 +1966,7 @@ body .ui-tooltip {
}
.ui-widget-overlay {
background: #666666;
opacity: .5;
opacity: 0.5;
filter: alpha(opacity=50);
}
.watermark {
@@ -2074,13 +2074,13 @@ input:-moz-placeholder {
-o-transition-property: width;
-webkit-transition-property: width;
transition-property: width;
-moz-transition-duration: .1s;
-o-transition-duration: .1s;
-webkit-transition-duration: .1s;
transition-duration: .1s;
-moz-transition-duration: 0.1s;
-o-transition-duration: 0.1s;
-webkit-transition-duration: 0.1s;
transition-duration: 0.1s;
}
.ui-tabs .ui-tabs-panel {
padding: .5em;
padding: 0.5em;
}
/*.ui-tabs > ul > li.ui-state-default
{
@@ -2101,8 +2101,8 @@ input:-moz-placeholder {
top: 40px !important;
animation-name: ui-dialog-show;
-webkit-animation-name: ui-dialog-show;
animation-duration: .2s;
-webkit-animation-duration: .2s;
animation-duration: 0.2s;
-webkit-animation-duration: 0.2s;
animation-timing-function: ease-in-out;
-webkit-animation-timing-function: ease-in-out;
}
@@ -2116,12 +2116,12 @@ input:-moz-placeholder {
font-size: 1.1em;
font-weight: normal;
text-transform: uppercase;
padding: .6em 1em;
padding: 0.6em 1em;
}
@keyframes ui-dialog-show {
0% {
transform: translateY(-30px);
opacity: 0.0;
opacity: 0;
}
100% {
transform: translateY(0);
@@ -2131,7 +2131,7 @@ input:-moz-placeholder {
@-webkit-keyframes ui-dialog-show {
0% {
-webkit-transform: translateY(-30px);
opacity: 0.0;
opacity: 0;
}
100% {
-webkit-transform: translateY(0);
@@ -2141,14 +2141,14 @@ input:-moz-placeholder {
.ui-widget-overlay.ui-front {
animation-name: ui-dialog-fadeIn;
-webkit-animation-name: ui-dialog-fadeIn;
animation-duration: .2s;
-webkit-animation-duration: .2s;
animation-duration: 0.2s;
-webkit-animation-duration: 0.2s;
animation-timing-function: ease-in-out;
-webkit-animation-timing-function: ease-in-out;
}
@keyframes ui-dialog-fadeIn {
0% {
opacity: 0.0;
opacity: 0;
}
100% {
opacity: 0.5;
@@ -2156,7 +2156,7 @@ input:-moz-placeholder {
}
@-webkit-keyframes ui-dialog-fadeIn {
0% {
opacity: 0.0;
opacity: 0;
}
100% {
opacity: 0.5;
@@ -2232,9 +2232,9 @@ body .ui-tooltip {
left: -1.85714286em;
}
.fa-border {
padding: .2em .25em .15em;
padding: 0.2em 0.25em 0.15em;
border: solid 0.08em #eee;
border-radius: .1em;
border-radius: 0.1em;
}
.pull-right {
float: right;
@@ -2243,10 +2243,10 @@ body .ui-tooltip {
float: left;
}
.fa.pull-left {
margin-right: .3em;
margin-right: 0.3em;
}
.fa.pull-right {
margin-left: .3em;
margin-left: 0.3em;
}
.fa-spin {
-webkit-animation: fa-spin 2s infinite linear;
@@ -3940,7 +3940,7 @@ header nav ul#menu > li > ul,
margin: 0;
border-left: 1px solid #D1D1D1;
border-right: 1px solid #D1D1D1;
background-color: #f2f2f2;
background-color: hsl(0, 0%, 95%);
padding: 0;
min-width: 180px;
box-shadow: 2px 2px 5px rgba(209, 209, 209, 0.5);
@@ -3950,7 +3950,7 @@ header nav ul#menu > li > ul li,
position: relative;
background-position: top;
background-repeat: repeat-x;
border-top: 1px solid #e6e6e6;
border-top: 1px solid hsl(0, 0%, 90%);
}
header nav ul#menu > li > ul li:first-child,
#header nav ul#menu > li > ul li:first-child {
@@ -3962,8 +3962,8 @@ header nav ul#menu > li > ul li:last-child,
}
header nav ul#menu > li > ul li:hover,
#header nav ul#menu > li > ul li:hover {
border-top: 1px solid #d9d9d9;
background-color: #e6e6e6;
border-top: 1px solid hsl(0, 0%, 85%);
background-color: hsl(0, 0%, 90%);
}
header nav ul#menu > li > ul li a,
#header nav ul#menu > li > ul li a {
@@ -4002,7 +4002,7 @@ header nav ul#menu > li > ul ul,
position: absolute;
top: -1px;
left: 180px;
background-color: #f2f2f2;
background-color: hsl(0, 0%, 95%);
border-left: 1px solid #D1D1D1;
border-right: 1px solid #D1D1D1;
padding: 0;
@@ -4014,7 +4014,7 @@ header #headerMenu,
float: right;
height: 24px;
padding: 5px 8px;
font-size: .9em;
font-size: 0.9em;
line-height: 24px;
text-align: right;
color: #fff;
@@ -4039,10 +4039,10 @@ header #SearchQuery,
-o-transition-property: width;
-webkit-transition-property: width;
transition-property: width;
-moz-transition-duration: .1s;
-o-transition-duration: .1s;
-webkit-transition-duration: .1s;
transition-duration: .1s;
-moz-transition-duration: 0.1s;
-o-transition-duration: 0.1s;
-webkit-transition-duration: 0.1s;
transition-duration: 0.1s;
}
header #SearchQuery:hover,
#header #SearchQuery:hover,
@@ -4057,7 +4057,7 @@ header .watermark,
}
#QuickSearchMenu {
max-height: 400px;
font-size: .9em;
font-size: 0.9em;
background: none;
background-color: #fafafa;
}
@@ -4071,7 +4071,7 @@ header .watermark,
margin-right: 2px;
}
#QuickSearchMenu li > a > div {
padding-left: 1.2857142857142858em;
padding-left: 1.28571429em;
margin-left: 2px;
}
#layout_PageHeading {
@@ -4243,7 +4243,7 @@ a.button.alert {
}
a.button.small {
padding: 2px 5px;
font-size: .9em;
font-size: 0.9em;
}
a.button:hover {
border: 1px solid #6b6b6b;
@@ -4356,7 +4356,7 @@ table.genericData > tbody > tr > td {
background-color: #fff;
}
table.genericData > tbody > tr:nth-child(odd) > td {
background-color: #fbfbfb;
background-color: hsl(0, 0%, 98.5%);
}
table.genericData > thead > tr > th,
table.genericData > tbody > tr > th {
@@ -4364,7 +4364,7 @@ table.genericData > tbody > tr > th {
border: solid 1px #f4f4f4;
}
table.genericData > tbody > tr:hover > td {
background-color: #f9f9f9;
background-color: hsl(0, 0%, 97.5%);
}
table.genericData > tfoot > tr > th,
table.genericData > tfoot > tr > td {
@@ -4378,7 +4378,7 @@ table.genericData td.id a {
}
.smallTable th,
.smallTable td {
font-size: .9em;
font-size: 0.9em;
}
/* Data Table Styles */
.dataTables_wrapper {
@@ -4395,12 +4395,12 @@ table.genericData td.id a {
height: 20px;
margin-top: -20px;
right: 0;
font-size: .9em;
font-size: 0.9em;
-moz-opacity: 0.3;
opacity: 0.3;
}
.dataTables_wrapper .dataTables_filter input {
font-size: .95em;
font-size: 0.95em;
padding: 0;
height: 1.4em;
width: 150px;
@@ -4410,12 +4410,12 @@ table.genericData td.id a {
height: 20px;
margin-top: -20px;
right: 200px;
font-size: .9em;
font-size: 0.9em;
-moz-opacity: 0.3;
opacity: 0.3;
}
.dataTables_wrapper .dataTables_length select {
font-size: .95em;
font-size: 0.95em;
padding: 0;
height: 1.4em;
}
@@ -4424,12 +4424,12 @@ table.genericData td.id a {
height: 20px;
margin-top: -20px;
right: 320px;
font-size: .9em;
font-size: 0.9em;
-moz-opacity: 0.3;
opacity: 0.3;
}
.dataTables_wrapper .dataTables_decommissioned input {
font-size: .8em;
font-size: 0.8em;
padding: 0;
height: 1.2em;
}
@@ -4437,7 +4437,7 @@ table.genericData td.id a {
text-align: right;
background-color: #f4f4f4;
padding: 2px 4px;
font-size: .9em;
font-size: 0.9em;
}
.dataTables_wrapper .dataTables_paginate a {
cursor: pointer;
@@ -4593,7 +4593,7 @@ table.jobTable > tbody > tr > td {
background-color: #fff;
}
table.jobTable > tbody > tr:nth-child(odd) > td {
background-color: #fbfbfb;
background-color: hsl(0, 0%, 98.5%);
}
table.jobTable > thead > tr > th,
table.jobTable > tbody > tr > th {
@@ -4601,7 +4601,7 @@ table.jobTable > tbody > tr > th {
border: solid 1px #f4f4f4;
}
table.jobTable > tbody > tr:hover > td {
background-color: #f9f9f9;
background-color: hsl(0, 0%, 97.5%);
}
table.jobTable > tfoot > tr > th,
table.jobTable > tfoot > tr > td {
@@ -4782,7 +4782,7 @@ button.button.alert {
input[type="submit"].button.small,
button.button.small {
padding: 2px 5px;
font-size: .9em;
font-size: 0.9em;
}
input[type="submit"].button[disabled],
button.button[disabled] {
@@ -4978,7 +4978,7 @@ div.Disco-AttachmentUpload-CommentDialog table > tbody > tr > td {
background-color: #fff;
}
div.Disco-AttachmentUpload-CommentDialog table > tbody > tr:nth-child(odd) > td {
background-color: #fbfbfb;
background-color: hsl(0, 0%, 98.5%);
}
div.Disco-AttachmentUpload-CommentDialog table > thead > tr > th,
div.Disco-AttachmentUpload-CommentDialog table > tbody > tr > th {
@@ -4986,7 +4986,7 @@ div.Disco-AttachmentUpload-CommentDialog table > tbody > tr > th {
border: solid 1px #f4f4f4;
}
div.Disco-AttachmentUpload-CommentDialog table > tbody > tr:hover > td {
background-color: #f9f9f9;
background-color: hsl(0, 0%, 97.5%);
}
div.Disco-AttachmentUpload-CommentDialog table > tfoot > tr > th,
div.Disco-AttachmentUpload-CommentDialog table > tfoot > tr > td {
@@ -5034,9 +5034,12 @@ body > .User_FlagAssignment_Tooltip span.added {
font-style: italic;
font-size: 0.9em;
}
#Document_Generation_Container #Document_Generate {
padding: 0;
}
.d-priority-high {
color: #FA6800;
width: 1.2857142857142858em;
width: 1.28571429em;
text-align: center;
}
.d-priority-high:before {
@@ -5044,7 +5047,7 @@ body > .User_FlagAssignment_Tooltip span.added {
}
.d-priority-normal {
color: #60A917;
width: 1.2857142857142858em;
width: 1.28571429em;
text-align: center;
}
.d-priority-normal:before {
@@ -5052,7 +5055,7 @@ body > .User_FlagAssignment_Tooltip span.added {
}
.d-priority-low {
color: #1e6dab;
width: 1.2857142857142858em;
width: 1.28571429em;
text-align: center;
}
.d-priority-low:before {
@@ -5062,10 +5065,10 @@ body > .User_FlagAssignment_Tooltip span.added {
.fa-stack .d-priority-normal,
.fa-stack .d-priority-low {
width: 100%;
font-size: .8em;
margin-left: .5em;
margin-top: .4em;
opacity: .6;
font-size: 0.8em;
margin-left: 0.5em;
margin-top: 0.4em;
opacity: 0.6;
}
.d-lime {
color: #A4C400;
@@ -5176,7 +5179,7 @@ td.subtleHighlight {
.ajaxRemove {
color: #e51400;
cursor: pointer;
opacity: .8;
opacity: 0.8;
}
.ajaxRemove:hover {
opacity: 1;
File diff suppressed because one or more lines are too long
-3
View File
@@ -138,9 +138,6 @@
#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_GenerateDocument_Container {
padding-top: 4px;
}
#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_GenerateDocument_Container #Device_Show_GenerateDocument {
padding: 0;
}
#Device_Show #Device_Show_Subjects #Device_Show_Policies table.verticalHeadings > tbody > tr > td:first-child {
width: 120px;
font-weight: 600;
-4
View File
@@ -84,10 +84,6 @@
#Device_Show_GenerateDocument_Container {
padding-top: 4px;
#Device_Show_GenerateDocument {
padding: 0;
}
}
}
File diff suppressed because one or more lines are too long
+14 -17
View File
@@ -7,7 +7,7 @@
background-color: #fff;
}
.tableData > tbody > tr:nth-child(odd) > td {
background-color: #fbfbfb;
background-color: hsl(0, 0%, 98.5%);
}
.tableData > thead > tr > th,
.tableData > tbody > tr > th {
@@ -15,7 +15,7 @@
border: solid 1px #f4f4f4;
}
.tableData > tbody > tr:hover > td {
background-color: #f9f9f9;
background-color: hsl(0, 0%, 97.5%);
}
.tableData > tfoot > tr > th,
.tableData > tfoot > tr > td {
@@ -171,9 +171,6 @@
#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_GenerateDocument_Container {
padding-top: 4px;
}
#Job_Show #Job_Show_Subjects #Job_Show_Job #Job_Show_GenerateDocument_Container #Job_Show_GenerateDocument {
padding: 0;
}
#Job_Show #Job_Show_Subjects #Job_Show_Device > div {
padding-left: 102px;
min-height: 100px;
@@ -197,7 +194,7 @@
}
#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HWar_Details_Button,
#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_Details_HNWar_Details_Button {
font-size: .9em;
font-size: 0.9em;
}
#Job_Show #Job_Show_Subjects #Job_Show_Device #Job_Show_Device_DeviceHeld table {
table-layout: fixed;
@@ -297,7 +294,7 @@
#jobShowResources #Comments div.commentOutput > div span.timestamp {
display: block;
float: right;
font-size: 0.90em;
font-size: 0.9em;
font-style: italic;
}
#jobShowResources #Comments div.commentOutput > div div.comment {
@@ -307,7 +304,7 @@
}
#jobShowResources #Comments div.commentOutput > div div.comment p {
line-height: 1.2em;
padding-bottom: .2em;
padding-bottom: 0.2em;
}
#jobShowResources #Comments div.commentOutput > div div.comment h1,
#jobShowResources #Comments div.commentOutput > div div.comment h2,
@@ -320,13 +317,13 @@
margin: 2px 0 !important;
}
#jobShowResources #Comments div.commentOutput > div div.comment hr {
margin-top: .2em;
margin-top: 0.2em;
}
#jobShowResources #Comments div.commentOutput > div div.comment code {
font-size: .9em;
font-size: 0.9em;
}
#jobShowResources #Comments div.commentOutput > div:hover span.remove {
opacity: .5;
opacity: 0.5;
}
#jobShowResources #Comments div.commentOutput > div span.remove {
font-size: 1.2em;
@@ -368,7 +365,7 @@
cursor: pointer;
float: left;
border: 1px solid #fff;
padding: .5em;
padding: 0.5em;
}
#jobShowResources #Comments div.commentInput span.action:hover {
color: #335A87;
@@ -450,7 +447,7 @@
border: 1px solid #ccc;
}
#jobShowResources #Attachments div.attachmentOutput > a:hover span.remove {
opacity: .5;
opacity: 0.5;
}
#jobShowResources #Attachments div.attachmentOutput > a span.remove {
font-size: 1.2em;
@@ -479,7 +476,7 @@
cursor: pointer;
float: right;
border: 1px solid #fff;
padding: .5em;
padding: 0.5em;
}
#jobShowResources #Attachments div.attachmentInput span.action:hover {
color: #335A87;
@@ -584,7 +581,7 @@
#jobDetailTab-Queues #jobQueues td.removed .when {
font-style: italic;
margin-top: 4px;
font-size: .9em;
font-size: 0.9em;
}
#jobDetailTab-Queues #jobQueues td.added .commentsRaw,
#jobDetailTab-Queues #jobQueues td.removed .commentsRaw {
@@ -642,7 +639,7 @@
font-size: 1.5em;
color: #e51400;
cursor: pointer;
opacity: .5;
opacity: 0.5;
}
#jobComponents tr span.remove:hover {
opacity: 1;
@@ -818,7 +815,7 @@
border: 1px solid #ccc;
}
#publishJobAttachments > a:hover span.remove {
opacity: .5;
opacity: 0.5;
}
#publishJobAttachments > a span.remove {
font-size: 1.2em;
-4
View File
@@ -122,10 +122,6 @@
#Job_Show_GenerateDocument_Container {
padding-top: 4px;
#Job_Show_GenerateDocument {
padding: 0;
}
}
}
File diff suppressed because one or more lines are too long
+41 -38
View File
@@ -7,7 +7,7 @@
background-color: #fff;
}
.tableData > tbody > tr:nth-child(odd) > td {
background-color: #fbfbfb;
background-color: hsl(0, 0%, 98.5%);
}
.tableData > thead > tr > th,
.tableData > tbody > tr > th {
@@ -15,7 +15,7 @@
border: solid 1px #f4f4f4;
}
.tableData > tbody > tr:hover > td {
background-color: #f9f9f9;
background-color: hsl(0, 0%, 97.5%);
}
.tableData > tfoot > tr > th,
.tableData > tfoot > tr > td {
@@ -173,7 +173,7 @@ header nav ul#menu > li > ul,
margin: 0;
border-left: 1px solid #D1D1D1;
border-right: 1px solid #D1D1D1;
background-color: #f2f2f2;
background-color: hsl(0, 0%, 95%);
padding: 0;
min-width: 180px;
box-shadow: 2px 2px 5px rgba(209, 209, 209, 0.5);
@@ -183,7 +183,7 @@ header nav ul#menu > li > ul li,
position: relative;
background-position: top;
background-repeat: repeat-x;
border-top: 1px solid #e6e6e6;
border-top: 1px solid hsl(0, 0%, 90%);
}
header nav ul#menu > li > ul li:first-child,
#header nav ul#menu > li > ul li:first-child {
@@ -195,8 +195,8 @@ header nav ul#menu > li > ul li:last-child,
}
header nav ul#menu > li > ul li:hover,
#header nav ul#menu > li > ul li:hover {
border-top: 1px solid #d9d9d9;
background-color: #e6e6e6;
border-top: 1px solid hsl(0, 0%, 85%);
background-color: hsl(0, 0%, 90%);
}
header nav ul#menu > li > ul li a,
#header nav ul#menu > li > ul li a {
@@ -235,7 +235,7 @@ header nav ul#menu > li > ul ul,
position: absolute;
top: -1px;
left: 180px;
background-color: #f2f2f2;
background-color: hsl(0, 0%, 95%);
border-left: 1px solid #D1D1D1;
border-right: 1px solid #D1D1D1;
padding: 0;
@@ -247,7 +247,7 @@ header #headerMenu,
float: right;
height: 24px;
padding: 5px 8px;
font-size: .9em;
font-size: 0.9em;
line-height: 24px;
text-align: right;
color: #fff;
@@ -272,10 +272,10 @@ header #SearchQuery,
-o-transition-property: width;
-webkit-transition-property: width;
transition-property: width;
-moz-transition-duration: .1s;
-o-transition-duration: .1s;
-webkit-transition-duration: .1s;
transition-duration: .1s;
-moz-transition-duration: 0.1s;
-o-transition-duration: 0.1s;
-webkit-transition-duration: 0.1s;
transition-duration: 0.1s;
}
header #SearchQuery:hover,
#header #SearchQuery:hover,
@@ -290,7 +290,7 @@ header .watermark,
}
#QuickSearchMenu {
max-height: 400px;
font-size: .9em;
font-size: 0.9em;
background: none;
background-color: #fafafa;
}
@@ -304,7 +304,7 @@ header .watermark,
margin-right: 2px;
}
#QuickSearchMenu li > a > div {
padding-left: 1.2857142857142858em;
padding-left: 1.28571429em;
margin-left: 2px;
}
#layout_PageHeading {
@@ -476,7 +476,7 @@ a.button.alert {
}
a.button.small {
padding: 2px 5px;
font-size: .9em;
font-size: 0.9em;
}
a.button:hover {
border: 1px solid #6b6b6b;
@@ -589,7 +589,7 @@ table.genericData > tbody > tr > td {
background-color: #fff;
}
table.genericData > tbody > tr:nth-child(odd) > td {
background-color: #fbfbfb;
background-color: hsl(0, 0%, 98.5%);
}
table.genericData > thead > tr > th,
table.genericData > tbody > tr > th {
@@ -597,7 +597,7 @@ table.genericData > tbody > tr > th {
border: solid 1px #f4f4f4;
}
table.genericData > tbody > tr:hover > td {
background-color: #f9f9f9;
background-color: hsl(0, 0%, 97.5%);
}
table.genericData > tfoot > tr > th,
table.genericData > tfoot > tr > td {
@@ -611,7 +611,7 @@ table.genericData td.id a {
}
.smallTable th,
.smallTable td {
font-size: .9em;
font-size: 0.9em;
}
/* Data Table Styles */
.dataTables_wrapper {
@@ -628,12 +628,12 @@ table.genericData td.id a {
height: 20px;
margin-top: -20px;
right: 0;
font-size: .9em;
font-size: 0.9em;
-moz-opacity: 0.3;
opacity: 0.3;
}
.dataTables_wrapper .dataTables_filter input {
font-size: .95em;
font-size: 0.95em;
padding: 0;
height: 1.4em;
width: 150px;
@@ -643,12 +643,12 @@ table.genericData td.id a {
height: 20px;
margin-top: -20px;
right: 200px;
font-size: .9em;
font-size: 0.9em;
-moz-opacity: 0.3;
opacity: 0.3;
}
.dataTables_wrapper .dataTables_length select {
font-size: .95em;
font-size: 0.95em;
padding: 0;
height: 1.4em;
}
@@ -657,12 +657,12 @@ table.genericData td.id a {
height: 20px;
margin-top: -20px;
right: 320px;
font-size: .9em;
font-size: 0.9em;
-moz-opacity: 0.3;
opacity: 0.3;
}
.dataTables_wrapper .dataTables_decommissioned input {
font-size: .8em;
font-size: 0.8em;
padding: 0;
height: 1.2em;
}
@@ -670,7 +670,7 @@ table.genericData td.id a {
text-align: right;
background-color: #f4f4f4;
padding: 2px 4px;
font-size: .9em;
font-size: 0.9em;
}
.dataTables_wrapper .dataTables_paginate a {
cursor: pointer;
@@ -826,7 +826,7 @@ table.jobTable > tbody > tr > td {
background-color: #fff;
}
table.jobTable > tbody > tr:nth-child(odd) > td {
background-color: #fbfbfb;
background-color: hsl(0, 0%, 98.5%);
}
table.jobTable > thead > tr > th,
table.jobTable > tbody > tr > th {
@@ -834,7 +834,7 @@ table.jobTable > tbody > tr > th {
border: solid 1px #f4f4f4;
}
table.jobTable > tbody > tr:hover > td {
background-color: #f9f9f9;
background-color: hsl(0, 0%, 97.5%);
}
table.jobTable > tfoot > tr > th,
table.jobTable > tfoot > tr > td {
@@ -1015,7 +1015,7 @@ button.button.alert {
input[type="submit"].button.small,
button.button.small {
padding: 2px 5px;
font-size: .9em;
font-size: 0.9em;
}
input[type="submit"].button[disabled],
button.button[disabled] {
@@ -1211,7 +1211,7 @@ div.Disco-AttachmentUpload-CommentDialog table > tbody > tr > td {
background-color: #fff;
}
div.Disco-AttachmentUpload-CommentDialog table > tbody > tr:nth-child(odd) > td {
background-color: #fbfbfb;
background-color: hsl(0, 0%, 98.5%);
}
div.Disco-AttachmentUpload-CommentDialog table > thead > tr > th,
div.Disco-AttachmentUpload-CommentDialog table > tbody > tr > th {
@@ -1219,7 +1219,7 @@ div.Disco-AttachmentUpload-CommentDialog table > tbody > tr > th {
border: solid 1px #f4f4f4;
}
div.Disco-AttachmentUpload-CommentDialog table > tbody > tr:hover > td {
background-color: #f9f9f9;
background-color: hsl(0, 0%, 97.5%);
}
div.Disco-AttachmentUpload-CommentDialog table > tfoot > tr > th,
div.Disco-AttachmentUpload-CommentDialog table > tfoot > tr > td {
@@ -1267,9 +1267,12 @@ body > .User_FlagAssignment_Tooltip span.added {
font-style: italic;
font-size: 0.9em;
}
#Document_Generation_Container #Document_Generate {
padding: 0;
}
.d-priority-high {
color: #FA6800;
width: 1.2857142857142858em;
width: 1.28571429em;
text-align: center;
}
.d-priority-high:before {
@@ -1277,7 +1280,7 @@ body > .User_FlagAssignment_Tooltip span.added {
}
.d-priority-normal {
color: #60A917;
width: 1.2857142857142858em;
width: 1.28571429em;
text-align: center;
}
.d-priority-normal:before {
@@ -1285,7 +1288,7 @@ body > .User_FlagAssignment_Tooltip span.added {
}
.d-priority-low {
color: #1e6dab;
width: 1.2857142857142858em;
width: 1.28571429em;
text-align: center;
}
.d-priority-low:before {
@@ -1295,10 +1298,10 @@ body > .User_FlagAssignment_Tooltip span.added {
.fa-stack .d-priority-normal,
.fa-stack .d-priority-low {
width: 100%;
font-size: .8em;
margin-left: .5em;
margin-top: .4em;
opacity: .6;
font-size: 0.8em;
margin-left: 0.5em;
margin-top: 0.4em;
opacity: 0.6;
}
.d-lime {
color: #A4C400;
@@ -1409,7 +1412,7 @@ td.subtleHighlight {
.ajaxRemove {
color: #e51400;
cursor: pointer;
opacity: .8;
opacity: 0.8;
}
.ajaxRemove:hover {
opacity: 1;
+6
View File
@@ -1290,6 +1290,12 @@ body > .User_FlagAssignment_Tooltip {
}
}
#Document_Generation_Container {
#Document_Generate {
padding: 0;
}
}
// Priority Colours
.d-priority-high {
color: @PriorityHigh;
File diff suppressed because one or more lines are too long
+4 -7
View File
@@ -7,7 +7,7 @@
background-color: #fff;
}
.tableData > tbody > tr:nth-child(odd) > td {
background-color: #fbfbfb;
background-color: hsl(0, 0%, 98.5%);
}
.tableData > thead > tr > th,
.tableData > tbody > tr > th {
@@ -15,7 +15,7 @@
border: solid 1px #f4f4f4;
}
.tableData > tbody > tr:hover > td {
background-color: #f9f9f9;
background-color: hsl(0, 0%, 97.5%);
}
.tableData > tfoot > tr > th,
.tableData > tfoot > tr > td {
@@ -121,9 +121,6 @@
#User_Show #User_Show_Subjects #User_Show_Details #User_Show_GenerateDocument_Container {
padding-top: 4px;
}
#User_Show #User_Show_Subjects #User_Show_Details #User_Show_GenerateDocument_Container #User_Show_GenerateDocument {
padding: 0;
}
#User_Show #User_Show_Subjects #User_Show_Details #User_Show_Details_Actions {
margin-top: 4px;
}
@@ -415,7 +412,7 @@
border: 1px solid #ccc;
}
#userShowResources #Attachments div.attachmentOutput > a:hover span.remove {
opacity: .5;
opacity: 0.5;
}
#userShowResources #Attachments div.attachmentOutput > a span.remove {
font-size: 1.4em;
@@ -444,7 +441,7 @@
cursor: pointer;
float: right;
border: 1px solid #fff;
padding: .5em;
padding: 0.5em;
}
#userShowResources #Attachments div.attachmentInput span.action:hover {
color: #335A87;
-4
View File
@@ -60,10 +60,6 @@
#User_Show_GenerateDocument_Container {
padding-top: 4px;
#User_Show_GenerateDocument {
padding: 0;
}
}
#User_Show_Details_Actions {
File diff suppressed because one or more lines are too long
+10
View File
@@ -786,6 +786,7 @@
<DesignTime>True</DesignTime>
<DependentUpon>T4MVC.tt</DependentUpon>
</Compile>
<Compile Include="Models\Shared\GenerateDocumentControlModel.cs" />
<Compile Include="Views\Device\ImportHeaders.generated.cs">
<DependentUpon>ImportHeaders.cshtml</DependentUpon>
<AutoGen>True</AutoGen>
@@ -1123,6 +1124,11 @@
<DesignTime>True</DesignTime>
<DependentUpon>_Layout.cshtml</DependentUpon>
</Compile>
<Compile Include="Views\Shared\_GenerateDocumentControl.generated.cs">
<DependentUpon>_GenerateDocumentControl.cshtml</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Views\Shared\_SearchDialog.generated.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@@ -2191,6 +2197,10 @@
<Generator>RazorGenerator</Generator>
<LastGenOutput>_JobTableRender.generated.cs</LastGenOutput>
</None>
<None Include="Views\Shared\_GenerateDocumentControl.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>_GenerateDocumentControl.generated.cs</LastGenOutput>
</None>
<None Include="Views\Shared\_SearchDialog.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>_SearchDialog.generated.cs</LastGenOutput>
@@ -173,6 +173,12 @@ namespace Disco.Web.Areas.API.Controllers
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public virtual System.Web.Mvc.ActionResult Generate()
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Generate);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public virtual System.Web.Mvc.ActionResult Delete()
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Delete);
@@ -213,6 +219,7 @@ namespace Disco.Web.Areas.API.Controllers
public readonly string ImporterUndetectedAssign = "ImporterUndetectedAssign";
public readonly string ImporterUndetectedDelete = "ImporterUndetectedDelete";
public readonly string BulkGenerate = "BulkGenerate";
public readonly string Generate = "Generate";
public readonly string Delete = "Delete";
}
@@ -239,6 +246,7 @@ namespace Disco.Web.Areas.API.Controllers
public const string ImporterUndetectedAssign = "ImporterUndetectedAssign";
public const string ImporterUndetectedDelete = "ImporterUndetectedDelete";
public const string BulkGenerate = "BulkGenerate";
public const string Generate = "Generate";
public const string Delete = "Delete";
}
@@ -431,6 +439,15 @@ namespace Disco.Web.Areas.API.Controllers
public readonly string DataIds = "DataIds";
public readonly string InsertBlankPage = "InsertBlankPage";
}
static readonly ActionParamsClass_Generate s_params_Generate = new ActionParamsClass_Generate();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionParamsClass_Generate GenerateParams { get { return s_params_Generate; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionParamsClass_Generate
{
public readonly string id = "id";
public readonly string TargetId = "TargetId";
}
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionParamsClass_Delete DeleteParams { get { return s_params_Delete; } }
@@ -746,6 +763,19 @@ namespace Disco.Web.Areas.API.Controllers
return callInfo;
}
[NonAction]
partial void GenerateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string TargetId);
[NonAction]
public override System.Web.Mvc.ActionResult Generate(string id, string TargetId)
{
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Generate);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "TargetId", TargetId);
GenerateOverride(callInfo, id, TargetId);
return callInfo;
}
[NonAction]
partial void DeleteOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, bool? redirect);
@@ -119,6 +119,12 @@ namespace Disco.Web.Areas.API.Controllers
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public virtual System.Web.Mvc.ActionResult Generate()
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Generate);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public virtual System.Web.Mvc.ActionResult Delete()
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Delete);
@@ -149,6 +155,7 @@ namespace Disco.Web.Areas.API.Controllers
public readonly string UpdateScope = "UpdateScope";
public readonly string UpdateJobSubTypes = "UpdateJobSubTypes";
public readonly string BulkGenerate = "BulkGenerate";
public readonly string Generate = "Generate";
public readonly string Delete = "Delete";
}
@@ -165,6 +172,7 @@ namespace Disco.Web.Areas.API.Controllers
public const string UpdateScope = "UpdateScope";
public const string UpdateJobSubTypes = "UpdateJobSubTypes";
public const string BulkGenerate = "BulkGenerate";
public const string Generate = "Generate";
public const string Delete = "Delete";
}
@@ -270,6 +278,15 @@ namespace Disco.Web.Areas.API.Controllers
public readonly string DataIds = "DataIds";
public readonly string InsertBlankPage = "InsertBlankPage";
}
static readonly ActionParamsClass_Generate s_params_Generate = new ActionParamsClass_Generate();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionParamsClass_Generate GenerateParams { get { return s_params_Generate; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionParamsClass_Generate
{
public readonly string id = "id";
public readonly string TargetId = "TargetId";
}
static readonly ActionParamsClass_Delete s_params_Delete = new ActionParamsClass_Delete();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionParamsClass_Delete DeleteParams { get { return s_params_Delete; } }
@@ -439,6 +456,19 @@ namespace Disco.Web.Areas.API.Controllers
return callInfo;
}
[NonAction]
partial void GenerateOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, string TargetId);
[NonAction]
public override System.Web.Mvc.ActionResult Generate(string id, string TargetId)
{
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Generate);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "id", id);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "TargetId", TargetId);
GenerateOverride(callInfo, id, TargetId);
return callInfo;
}
[NonAction]
partial void DeleteOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string id, bool? redirect);
@@ -38,6 +38,7 @@ namespace T4MVC
{
public readonly string _DialogLayout = "_DialogLayout";
public readonly string _EmptyLayout = "_EmptyLayout";
public readonly string _GenerateDocumentControl = "_GenerateDocumentControl";
public readonly string _JobTable = "_JobTable";
public readonly string _JobTableRender = "_JobTableRender";
public readonly string _Layout = "_Layout";
@@ -47,6 +48,7 @@ namespace T4MVC
}
public readonly string _DialogLayout = "~/Views/Shared/_DialogLayout.cshtml";
public readonly string _EmptyLayout = "~/Views/Shared/_EmptyLayout.cshtml";
public readonly string _GenerateDocumentControl = "~/Views/Shared/_GenerateDocumentControl.cshtml";
public readonly string _JobTable = "~/Views/Shared/_JobTable.cshtml";
public readonly string _JobTableRender = "~/Views/Shared/_JobTableRender.cshtml";
public readonly string _Layout = "~/Views/Shared/_Layout.cshtml";
+6 -13
View File
@@ -2,9 +2,8 @@
using Disco.Models.Services.Jobs.JobLists;
using Disco.Models.UI.Device;
using Disco.Services.Plugins;
using Disco.Web.Extensions;
using Disco.Web.Models.Shared;
using System.Collections.Generic;
using System.Web.Mvc;
namespace Disco.Web.Models.Device
{
@@ -25,17 +24,11 @@ namespace Disco.Web.Models.Device
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
public List<DocumentTemplatePackage> DocumentTemplatePackages { get; set; }
public List<SelectListItem> DocumentTemplatesSelectListItems
public GenerateDocumentControlModel GenerateDocumentControlModel => new GenerateDocumentControlModel()
{
get
{
var list = new List<SelectListItem>();
list.Add(new SelectListItem() { Selected = true, Value = string.Empty, Text = "Generate Document" });
list.AddRange(DocumentTemplates.ToSelectListItems());
list.AddRange(DocumentTemplatePackages.ToSelectListItems());
return list;
}
}
Target = Device,
Templates = DocumentTemplates,
TemplatePackages = DocumentTemplatePackages,
};
}
}
+8 -15
View File
@@ -2,10 +2,9 @@
using Disco.Models.Services.Job;
using Disco.Models.Services.Jobs.JobLists;
using Disco.Models.UI.Job;
using Disco.Web.Extensions;
using Disco.Web.Models.Shared;
using System;
using System.Collections.Generic;
using System.Web.Mvc;
namespace Disco.Web.Models.Job
{
@@ -17,22 +16,16 @@ namespace Disco.Web.Models.Job
public List<Disco.Models.Repository.DocumentTemplate> AvailableDocumentTemplates { get; set; }
public List<DocumentTemplatePackage> AvailableDocumentTemplatePackages { get; set; }
public GenerateDocumentControlModel GenerateDocumentControlModel => new GenerateDocumentControlModel()
{
Target = Job,
Templates = AvailableDocumentTemplates,
TemplatePackages = AvailableDocumentTemplatePackages,
};
public List<Disco.Models.Repository.JobSubType> UpdatableJobSubTypes { get; set; }
public List<Disco.Models.Repository.JobQueue> AvailableQueues { get; set; }
public List<SelectListItem> DocumentTemplatesSelectListItems
{
get
{
var list = new List<SelectListItem>();
list.Add(new SelectListItem() { Selected = true, Value = string.Empty, Text = "Generate Document" });
list.AddRange(AvailableDocumentTemplates.ToSelectListItems());
list.AddRange(AvailableDocumentTemplatePackages.ToSelectListItems());
return list;
}
}
public LocationModes LocationMode { get; set; }
public List<JobLocationReference> LocationOptions { get; set; }
}
@@ -0,0 +1,14 @@
using Disco.Models.Repository;
using Disco.Models.Services.Documents;
using Disco.Services.Plugins.Features.DocumentHandlerProvider;
using System.Collections.Generic;
namespace Disco.Web.Models.Shared
{
public class GenerateDocumentControlModel
{
public IAttachmentTarget Target { get; set; }
public List<DocumentTemplate> Templates { get; set; }
public List<DocumentTemplatePackage> TemplatePackages { get; set; }
}
}
+6 -15
View File
@@ -3,12 +3,9 @@ using Disco.Models.Services.Authorization;
using Disco.Models.Services.Documents;
using Disco.Models.Services.Jobs.JobLists;
using Disco.Models.UI.User;
using Disco.Services.Users.UserFlags;
using Disco.Web.Extensions;
using Disco.Web.Models.Shared;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
namespace Disco.Web.Models.User
{
@@ -18,6 +15,12 @@ namespace Disco.Web.Models.User
public JobTableModel Jobs { get; set; }
public List<DocumentTemplate> DocumentTemplates { get; set; }
public List<DocumentTemplatePackage> DocumentTemplatePackages { get; set; }
public GenerateDocumentControlModel GenerateDocumentControlModel => new GenerateDocumentControlModel()
{
Target = User,
Templates = DocumentTemplates,
TemplatePackages = DocumentTemplatePackages,
};
public List<UserFlag> AvailableUserFlags { get; set; }
@@ -37,18 +40,6 @@ namespace Disco.Web.Models.User
}
}
public List<SelectListItem> DocumentTemplatesSelectListItems
{
get
{
var list = new List<SelectListItem>();
list.Add(new SelectListItem() { Selected = true, Value = string.Empty, Text = "Select a Document to Generate" });
list.AddRange(DocumentTemplates.ToSelectListItems());
list.AddRange(DocumentTemplatePackages.ToSelectListItems());
return list;
}
}
public string PrimaryDeviceSerialNumber
{
get
@@ -279,46 +279,7 @@
@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, null))?DocumentTemplateId=';
var generatePackageUrl = '@Url.Action(MVC.API.Device.GeneratePdfPackage(Model.Device.SerialNumber, null))?DocumentTemplatePackageId=';
var $documentTemplates = $('#Device_Show_GenerateDocument');
var $generationHost;
$documentTemplates.change(function () {
var v = $documentTemplates.val();
if (v) {
var url;
if (v.lastIndexOf('Package:', 0) === 0) {
url = generatePackageUrl + v.substring(8);
} else {
url = generatePdfUrl + v;
}
if ($.connection && $.connection.hub && $.connection.hub.transport &&
$.connection.hub.transport.name == 'foreverFrame') {
// SignalR active with foreverFrame transport - use popup window
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
} else {
// use iFrame
if (!$generationHost) {
$generationHost = $('<iframe>')
.attr({ 'src': url, 'title': 'Document Generation Host' })
.addClass('hidden')
.appendTo('body')
.contents();
} else {
$generationHost[0].location.href = url;
}
}
$documentTemplates.val('').blur();
}
});
});
</script>
@Html.Partial(MVC.Shared.Views._GenerateDocumentControl, Model.GenerateDocumentControlModel)
</div>
}
</div>
File diff suppressed because it is too large Load Diff
+21 -49
View File
@@ -11,7 +11,8 @@
<div id="Job_Show_Job_Dates">
<table class="none">
<tr>
<td>Opened:
<td>
Opened:
</td>
<td><span id="Job_Show_Job_Dates_Opened">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.OpenedDate, Model.Job.OpenedTechUser)</span></td>
</tr>
@@ -21,7 +22,8 @@
<td>
<span title="Expected to Close">Expected:</span>
</td>
<td>@if (Authorization.Has(Claims.Job.Properties.ExpectedClosedDate))
<td>
@if (Authorization.Has(Claims.Job.Properties.ExpectedClosedDate))
{
@Html.TextBoxFor(m => m.Job.ExpectedClosedDate, "{0:yyyy/MM/dd hh:mm tt}", new { @class = "small discreet" }) @AjaxHelpers.AjaxSave() @AjaxHelpers.AjaxLoader()
<script type="text/javascript">
@@ -75,7 +77,8 @@
@if (Model.Job.ClosedDate.HasValue)
{
<tr>
<td>Closed:
<td>
Closed:
</td>
<td><span id="Job_Show_Job_Dates_Closed">@CommonHelpers.FriendlyDateAndTitleUser(Model.Job.ClosedDate, Model.Job.ClosedTechUser)</span></td>
</tr>
@@ -116,7 +119,8 @@
<div id="Job_Show_Job_SubTypes_Update_Dialog" title="Update Job Types">
<div>
<h2>
@Model.Job.JobType.Description</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)
@@ -162,46 +166,7 @@
@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, null))?DocumentTemplateId=';
var generatePackageUrl = '@Url.Action(MVC.API.Job.GeneratePdfPackage(Model.Job.Id, null))?DocumentTemplatePackageId=';
var $documentTemplates = $('#Job_Show_GenerateDocument');
var $generationHost;
$documentTemplates.change(function () {
var v = $documentTemplates.val();
if (v) {
var url;
if (v.lastIndexOf('Package:', 0) === 0) {
url = generatePackageUrl + v.substring(8);
} else {
url = generatePdfUrl + v;
}
if ($.connection && $.connection.hub && $.connection.hub.transport &&
$.connection.hub.transport.name == 'foreverFrame') {
// SignalR active with foreverFrame transport - use popup window
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
} else {
// use iFrame
if (!$generationHost) {
$generationHost = $('<iframe>')
.attr({ 'src': url, 'title': 'Document Generation Host' })
.addClass('hidden')
.appendTo('body')
.contents();
} else {
$generationHost[0].location.href = url;
}
}
$documentTemplates.val('').blur();
}
});
});
</script>
@Html.Partial(MVC.Shared.Views._GenerateDocumentControl, Model.GenerateDocumentControlModel)
</div>
}
</div>
@@ -210,10 +175,12 @@
{
<td id="Job_Show_Device">
<div>
<h2 id="Job_Show_Device_SerialNumber" title="Serial Number">@if (Authorization.Has(Claims.Device.Show))
<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>
{@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()))" />
@@ -461,7 +428,8 @@
{
<td id="Job_Show_User">
<div>
<h2 id="Job_Show_User_DisplayName" title="Display Name">@if (Authorization.Has(Claims.User.Show))
<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}
@@ -479,8 +447,12 @@
<div id="Job_Show_User_Flags">
@foreach (var flag in Model.Job.User.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
{
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw d-@(flag.Item2.IconColour)"><span class="details"><span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)</span></span></i>
<i class="flag fa fa-@(flag.Item2.Icon) fa-fw d-@(flag.Item2.IconColour)">
<span class="details">
<span class="name">@flag.Item2.Name</span>@if (flag.Item1.Comments != null)
{<span class="comments">@flag.Item1.Comments.ToHtmlComment()</span>}<span class="added">@CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId)</span>
</span>
</i>
}
<script type="text/javascript">
$(function () {
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,58 @@
@model Disco.Web.Models.Shared.GenerateDocumentControlModel
@if (Model.Templates.Count > 0 || Model.TemplatePackages.Count > 0)
{
var selectListItems = new List<SelectListItem>();
selectListItems.Add(new SelectListItem() { Selected = true, Value = string.Empty, Text = "Generate Document" });
selectListItems.AddRange(Model.Templates.ToSelectListItems());
selectListItems.AddRange(Model.TemplatePackages.ToSelectListItems());
<div id="Document_Generation_Container">
@Html.DropDownList("Document_Generate", selectListItems)
<div id="Document_Generation_Dialog" class="dialog" title="Generate Document">
</div>
</div>
<script type="text/javascript">
$(function () {
var generatePdfUrl = '@Url.Action(MVC.API.DocumentTemplate.Generate())/';
var generatePackageUrl = '@Url.Action(MVC.API.DocumentTemplatePackage.Generate())/';
var generateTargetId = '@HttpUtility.UrlEncode(Model.Target.AttachmentReferenceId)';
var $control = $('#Document_Generate');
var $generationHost;
var downloadDocument = function (templateId) {
var url;
if (templateId.lastIndexOf('Package:', 0) === 0)
url = generatePackageUrl + templateId.substring(8);
else
url = generatePdfUrl + templateId;
url = url + '?TargetId=' + generateTargetId;
if ($.connection && $.connection.hub && $.connection.hub.transport &&
$.connection.hub.transport.name == 'foreverFrame') {
// SignalR active with foreverFrame transport - use popup window
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
} else {
// use iFrame
if (!$generationHost) {
$generationHost = $('<iframe>')
.attr({ 'src': url, 'title': 'Document Generation Host' })
.addClass('hidden')
.appendTo('body')
.contents();
} else {
$generationHost[0].location.href = url;
}
}
}
$control.change(function () {
var templateId = $control.val();
if (templateId) {
downloadDocument(templateId);
$control.val('').blur();
}
});
});
</script>
}
@@ -0,0 +1,146 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Views.Shared
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco;
using Disco.Models.Repository;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Shared/_GenerateDocumentControl.cshtml")]
public partial class _GenerateDocumentControl : Disco.Services.Web.WebViewPage<Disco.Web.Models.Shared.GenerateDocumentControlModel>
{
public _GenerateDocumentControl()
{
}
public override void Execute()
{
#line 2 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
if (Model.Templates.Count > 0 || Model.TemplatePackages.Count > 0)
{
var selectListItems = new List<SelectListItem>();
selectListItems.Add(new SelectListItem() { Selected = true, Value = string.Empty, Text = "Generate Document" });
selectListItems.AddRange(Model.Templates.ToSelectListItems());
selectListItems.AddRange(Model.TemplatePackages.ToSelectListItems());
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" id=\"Document_Generation_Container\"");
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 9 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
Write(Html.DropDownList("Document_Generate", selectListItems));
#line default
#line hidden
WriteLiteral("\r\n <div");
WriteLiteral(" id=\"Document_Generation_Dialog\"");
WriteLiteral(" class=\"dialog\"");
WriteLiteral(" title=\"Generate Document\"");
WriteLiteral(">\r\n </div>\r\n </div>\r\n");
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n var generatePdfUrl = \'");
#line 15 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
Write(Url.Action(MVC.API.DocumentTemplate.Generate()));
#line default
#line hidden
WriteLiteral("/\';\r\n var generatePackageUrl = \'");
#line 16 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
Write(Url.Action(MVC.API.DocumentTemplatePackage.Generate()));
#line default
#line hidden
WriteLiteral("/\';\r\n var generateTargetId = \'");
#line 17 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
Write(HttpUtility.UrlEncode(Model.Target.AttachmentReferenceId));
#line default
#line hidden
WriteLiteral("\';\r\n var $control = $(\'#Document_Generate\');\r\n var $generat" +
"ionHost;\r\n\r\n var downloadDocument = function (templateId) {\r\n\r\n " +
" var url;\r\n if (templateId.lastIndexOf(\'Package:\', 0) ==" +
"= 0)\r\n url = generatePackageUrl + templateId.substring(8);\r\n " +
" else\r\n url = generatePdfUrl + templateId;\r\n " +
" url = url + \'?TargetId=\' + generateTargetId;\r\n\r\n if " +
"($.connection && $.connection.hub && $.connection.hub.transport &&\r\n " +
" $.connection.hub.transport.name == \'foreverFrame\') {\r\n " +
" // SignalR active with foreverFrame transport - use popup window\r\n " +
" window.open(url, \'_blank\', \'height=150,width=250,location=no,menubar=no," +
"resizable=no,scrollbars=no,status=no,toolbar=no\');\r\n } else {\r\n " +
" // use iFrame\r\n if (!$generationHost) {\r\n " +
" $generationHost = $(\'<iframe>\')\r\n " +
" .attr({ \'src\': url, \'title\': \'Document Generation Host\' })\r\n " +
" .addClass(\'hidden\')\r\n .appendTo(\'body\')\r\n " +
" .contents();\r\n } else {\r\n " +
" $generationHost[0].location.href = url;\r\n }\r\n " +
" }\r\n }\r\n\r\n $control.change(function () {\r\n " +
" var templateId = $control.val();\r\n if (templateId) " +
"{\r\n downloadDocument(templateId);\r\n\r\n $con" +
"trol.val(\'\').blur();\r\n }\r\n });\r\n });\r\n </scr" +
"ipt>\r\n");
#line 58 "..\..\Views\Shared\_GenerateDocumentControl.cshtml"
}
#line default
#line hidden
}
}
}
#pragma warning restore 1591
+1 -40
View File
@@ -69,46 +69,7 @@
@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.UserId, null))?DocumentTemplateId=';
var generatePackageUrl = '@Url.Action(MVC.API.User.GeneratePdfPackage(Model.User.UserId, null))?DocumentTemplatePackageId=';
var $documentTemplates = $('#User_Show_GenerateDocument');
var $generationHost;
$documentTemplates.change(function () {
var v = $documentTemplates.val();
if (v) {
var url;
if (v.lastIndexOf('Package:', 0) === 0) {
url = generatePackageUrl + v.substring(8);
} else {
url = generatePdfUrl + v;
}
if ($.connection && $.connection.hub && $.connection.hub.transport &&
$.connection.hub.transport.name == 'foreverFrame') {
// SignalR active with foreverFrame transport - use popup window
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
} else {
// use iFrame
if (!$generationHost) {
$generationHost = $('<iframe>')
.attr({ 'src': url, 'title': 'Document Generation Host' })
.addClass('hidden')
.appendTo('body')
.contents();
} else {
$generationHost[0].location.href = url;
}
}
$documentTemplates.val('').blur();
}
});
});
</script>
@Html.Partial(MVC.Shared.Views._GenerateDocumentControl, Model.GenerateDocumentControlModel)
</div>
}
<div id="User_Show_Details_Actions">
@@ -313,69 +313,15 @@ WriteLiteral(" ");
#line 72 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Html.DropDownList("User_Show_GenerateDocument", Model.DocumentTemplatesSelectListItems));
Write(Html.Partial(MVC.Shared.Views._GenerateDocumentControl, Model.GenerateDocumentControlModel));
#line default
#line hidden
WriteLiteral("\r\n <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n " +
" var generatePdfUrl = \'");
WriteLiteral("\r\n </div>\r\n");
#line 75 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Url.Action(MVC.API.User.GeneratePdf(Model.User.UserId, null)));
#line default
#line hidden
WriteLiteral("?DocumentTemplateId=\';\r\n var generatePackageUr" +
"l = \'");
#line 76 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Url.Action(MVC.API.User.GeneratePdfPackage(Model.User.UserId, null)));
#line default
#line hidden
WriteLiteral("?DocumentTemplatePackageId=\';\r\n var $documentT" +
"emplates = $(\'#User_Show_GenerateDocument\');\r\n " +
" var $generationHost;\r\n\r\n $documentTemplates" +
".change(function () {\r\n var v = $document" +
"Templates.val();\r\n if (v) {\r\n " +
" var url;\r\n " +
" if (v.lastIndexOf(\'Package:\', 0) === 0) {\r\n " +
" url = generatePackageUrl + v.substring(8);\r\n " +
" } else {\r\n " +
" url = generatePdfUrl + v;\r\n }\r\n\r\n " +
" if ($.connection && $.connection.hub " +
"&& $.connection.hub.transport &&\r\n " +
" $.connection.hub.transport.name == \'foreverFrame\') {\r\n " +
" // SignalR active with foreverFrame transport - use " +
"popup window\r\n window.open(url, \'" +
"_blank\', \'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no" +
",status=no,toolbar=no\');\r\n } else {\r\n" +
" // use iFrame\r\n " +
" if (!$generationHost) {\r\n " +
" $generationHost = $(\'<iframe>\')\r\n " +
" .attr({ \'src\': url, \'title\': \'Document Gene" +
"ration Host\' })\r\n .addCla" +
"ss(\'hidden\')\r\n .appendTo(" +
"\'body\')\r\n .contents();\r\n " +
" } else {\r\n " +
" $generationHost[0].location.href = url;\r\n " +
" }\r\n " +
" }\r\n\r\n $documentTemplates.val(\'\')" +
".blur();\r\n }\r\n " +
" });\r\n });\r\n <" +
"/script>\r\n </div>\r\n");
#line 113 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 74 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -388,13 +334,13 @@ WriteLiteral(" id=\"User_Show_Details_Actions\"");
WriteLiteral(">\r\n");
#line 115 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 76 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 115 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 76 "..\..\Views\User\UserParts\_Subject.cshtml"
if (Model.User.CanCreateJob())
{
Html.BundleDeferred("~/ClientScripts/Modules/Disco-CreateJob");
@@ -403,14 +349,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 118 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 79 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Create Job", MVC.Job.Create(Model.PrimaryDeviceSerialNumber, Model.User.UserId), "User_Show_Details_Actions_CreateJob_Button"));
#line default
#line hidden
#line 118 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 79 "..\..\Views\User\UserParts\_Subject.cshtml"
if (currentDeviceAssignments.Count > 1)
{
@@ -450,13 +396,13 @@ WriteLiteral(" class=\"none\"");
WriteLiteral(">\r\n");
#line 131 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 92 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 131 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 92 "..\..\Views\User\UserParts\_Subject.cshtml"
foreach (var assignment in currentDeviceAssignments)
{
@@ -470,7 +416,7 @@ WriteLiteral(" class=\"CreateJob_Assignment clearfix\"");
WriteLiteral(" data-createjoburl=\"");
#line 133 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 94 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Url.Action(MVC.Job.Create(assignment.DeviceSerialNumber, Model.User.UserId)));
@@ -494,14 +440,14 @@ WriteLiteral(" class=\"CreateJob_Assignment_Image\"");
WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 8795), Tuple.Create("\"", 8916)
WriteAttribute("src", Tuple.Create(" src=\"", 6003), Tuple.Create("\"", 6124)
#line 138 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 8801), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
#line 99 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 6009), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
#line default
#line hidden
, 8801), false)
, 6009), false)
);
WriteLiteral(@" />
@@ -515,7 +461,7 @@ WriteLiteral(@" />
<span>");
#line 146 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 107 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.SerialNumber);
@@ -524,7 +470,7 @@ WriteLiteral(@" />
WriteLiteral("</span> (<span>");
#line 146 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 107 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.ComputerName);
@@ -541,7 +487,7 @@ WriteLiteral(@"</span>)
<span>");
#line 154 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 115 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.DeviceModel.ToString());
@@ -556,13 +502,13 @@ WriteLiteral(@"</span>
");
#line 160 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 121 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 160 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 121 "..\..\Views\User\UserParts\_Subject.cshtml"
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
{
@@ -572,7 +518,7 @@ WriteLiteral(@"</span>
WriteLiteral(" <span>");
#line 162 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 123 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.AssetNumber);
@@ -581,7 +527,7 @@ WriteLiteral(" <s
WriteLiteral("</span>\r\n");
#line 163 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 124 "..\..\Views\User\UserParts\_Subject.cshtml"
}
else
{
@@ -596,7 +542,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">Unknown</span>\r\n");
#line 167 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 128 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -610,7 +556,7 @@ WriteLiteral(@" </td>
<span>");
#line 173 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 134 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
@@ -624,7 +570,7 @@ WriteLiteral(@"</span>
</li>");
#line 178 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 139 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -662,7 +608,7 @@ WriteLiteral(" <script>\r\n
";\r\n </script>\r\n");
#line 218 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 179 "..\..\Views\User\UserParts\_Subject.cshtml"
}
else
{
@@ -685,7 +631,7 @@ WriteLiteral(@" <script>
");
#line 233 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 194 "..\..\Views\User\UserParts\_Subject.cshtml"
}
}
@@ -695,7 +641,7 @@ WriteLiteral(@" <script>
WriteLiteral(" ");
#line 235 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 196 "..\..\Views\User\UserParts\_Subject.cshtml"
if (Model.User.CanAddUserFlags() && Model.AvailableUserFlags != null && Model.AvailableUserFlags.Count > 0)
{
@@ -703,14 +649,14 @@ WriteLiteral(" ");
#line default
#line hidden
#line 237 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 198 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Html.ActionLinkSmallButton("Add Flag", MVC.API.UserFlagAssignment.AddUser(), "User_Show_Details_Actions_AddFlag_Button"));
#line default
#line hidden
#line 237 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 198 "..\..\Views\User\UserParts\_Subject.cshtml"
@@ -727,13 +673,13 @@ WriteLiteral(" title=\"Add User Flag\"");
WriteLiteral(">\r\n");
#line 239 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 200 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 239 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 200 "..\..\Views\User\UserParts\_Subject.cshtml"
using (Html.BeginForm(MVC.API.UserFlagAssignment.AddUser()))
{
@@ -758,14 +704,14 @@ WriteLiteral(" type=\"hidden\"");
WriteLiteral(" name=\"UserId\"");
WriteAttribute("value", Tuple.Create(" value=\"", 15615), Tuple.Create("\"", 15641)
WriteAttribute("value", Tuple.Create(" value=\"", 12823), Tuple.Create("\"", 12849)
#line 242 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 15623), Tuple.Create<System.Object, System.Int32>(Model.User.UserId
#line 203 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 12831), Tuple.Create<System.Object, System.Int32>(Model.User.UserId
#line default
#line hidden
, 15623), false)
, 12831), false)
);
WriteLiteral(" />\r\n");
@@ -777,13 +723,13 @@ WriteLiteral(" class=\"flagPicker\"");
WriteLiteral(">\r\n");
#line 244 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 205 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 244 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 205 "..\..\Views\User\UserParts\_Subject.cshtml"
foreach (var userFlag in Model.AvailableUserFlags.OrderBy(jq => jq.Name))
{
@@ -797,7 +743,7 @@ WriteLiteral(" class=\"flag\"");
WriteLiteral(" data-userflagid=\"");
#line 246 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 207 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(userFlag.Id);
@@ -807,32 +753,32 @@ WriteLiteral("\"");
WriteLiteral(">\r\n <i");
WriteAttribute("class", Tuple.Create(" class=\"", 16015), Tuple.Create("\"", 16082)
, Tuple.Create(Tuple.Create("", 16023), Tuple.Create("fa", 16023), true)
, Tuple.Create(Tuple.Create(" ", 16025), Tuple.Create("fa-", 16026), true)
WriteAttribute("class", Tuple.Create(" class=\"", 13223), Tuple.Create("\"", 13290)
, Tuple.Create(Tuple.Create("", 13231), Tuple.Create("fa", 13231), true)
, Tuple.Create(Tuple.Create(" ", 13233), Tuple.Create("fa-", 13234), true)
#line 247 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 16029), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
#line 208 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 13237), Tuple.Create<System.Object, System.Int32>(userFlag.Icon
#line default
#line hidden
, 16029), false)
, Tuple.Create(Tuple.Create(" ", 16045), Tuple.Create("fa-fw", 16046), true)
, Tuple.Create(Tuple.Create(" ", 16051), Tuple.Create("fa-lg", 16052), true)
, Tuple.Create(Tuple.Create(" ", 16057), Tuple.Create("d-", 16058), true)
, 13237), false)
, Tuple.Create(Tuple.Create(" ", 13253), Tuple.Create("fa-fw", 13254), true)
, Tuple.Create(Tuple.Create(" ", 13259), Tuple.Create("fa-lg", 13260), true)
, Tuple.Create(Tuple.Create(" ", 13265), Tuple.Create("d-", 13266), true)
#line 247 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 16060), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
#line 208 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 13268), Tuple.Create<System.Object, System.Int32>(userFlag.IconColour
#line default
#line hidden
, 16060), false)
, 13268), false)
);
WriteLiteral("></i>");
#line 247 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 208 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(userFlag.Name);
@@ -841,7 +787,7 @@ WriteLiteral("></i>");
WriteLiteral("\r\n </div>\r\n");
#line 249 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 210 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -865,7 +811,7 @@ WriteLiteral("></textarea>\r\n </div>\r\n
" </div>\r\n");
#line 257 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 218 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -926,7 +872,7 @@ WriteLiteral(">\r\n $(function () {\r\n
"\r\n });\r\n </script>\r\n");
#line 324 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 285 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -935,13 +881,13 @@ WriteLiteral(">\r\n $(function () {\r\n
WriteLiteral(" </div>\r\n </div>\r\n </td>\r\n");
#line 328 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 289 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 328 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 289 "..\..\Views\User\UserParts\_Subject.cshtml"
if (Authorization.Has(Claims.User.ShowAssignments))
{
@@ -959,13 +905,13 @@ WriteLiteral(" id=\"User_Show_AssignedDevices_Active\"");
WriteLiteral(">\r\n <h3>Current Device Assignments</h3>\r\n");
#line 334 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 295 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 334 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 295 "..\..\Views\User\UserParts\_Subject.cshtml"
if (currentDeviceAssignments.Count > 0)
{
foreach (var assignment in currentDeviceAssignments)
@@ -981,7 +927,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment clearfix\"");
WriteLiteral(" data-deviceserialnumber=\"");
#line 338 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 299 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.DeviceSerialNumber);
@@ -992,13 +938,13 @@ WriteLiteral("\"");
WriteLiteral(">\r\n");
#line 339 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 300 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 339 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 300 "..\..\Views\User\UserParts\_Subject.cshtml"
if (Authorization.Has(Claims.Device.Show))
{
@@ -1007,14 +953,14 @@ WriteLiteral(">\r\n");
#line hidden
WriteLiteral(" <a");
WriteAttribute("href", Tuple.Create(" href=\"", 21480), Tuple.Create("\"", 21547)
WriteAttribute("href", Tuple.Create(" href=\"", 18688), Tuple.Create("\"", 18755)
#line 341 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 21487), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
#line 302 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 18695), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Device.Show(assignment.Device.SerialNumber))
#line default
#line hidden
, 21487), false)
, 18695), false)
);
WriteLiteral(">\r\n <img");
@@ -1023,20 +969,20 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 21679), Tuple.Create("\"", 21800)
WriteAttribute("src", Tuple.Create(" src=\"", 18887), Tuple.Create("\"", 19008)
#line 342 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 21685), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
#line 303 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 18893), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
#line default
#line hidden
, 21685), false)
, 18893), false)
);
WriteLiteral(" />\r\n </a>\r\n");
#line 344 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 305 "..\..\Views\User\UserParts\_Subject.cshtml"
}
else
{
@@ -1050,20 +996,20 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Image\"");
WriteLiteral(" alt=\"Model Image\"");
WriteAttribute("src", Tuple.Create(" src=\"", 22112), Tuple.Create("\"", 22233)
WriteAttribute("src", Tuple.Create(" src=\"", 19320), Tuple.Create("\"", 19441)
#line 347 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 22118), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
#line 308 "..\..\Views\User\UserParts\_Subject.cshtml"
, Tuple.Create(Tuple.Create("", 19326), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.API.DeviceModel.Image(assignment.Device.DeviceModel.Id, assignment.Device.DeviceModel.ImageHash()))
#line default
#line hidden
, 22118), false)
, 19326), false)
);
WriteLiteral(" />\r\n");
#line 348 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 309 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -1091,13 +1037,13 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_SerialNumber\
WriteLiteral(">\r\n");
#line 358 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 319 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 358 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 319 "..\..\Views\User\UserParts\_Subject.cshtml"
if (Authorization.Has(Claims.Device.Show))
{
@@ -1105,14 +1051,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 360 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 321 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(Html.ActionLink(assignment.Device.SerialNumber, MVC.Device.Show(assignment.Device.SerialNumber)));
#line default
#line hidden
#line 360 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 321 "..\..\Views\User\UserParts\_Subject.cshtml"
}
else
@@ -1122,14 +1068,14 @@ WriteLiteral(">\r\n");
#line default
#line hidden
#line 364 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 325 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.SerialNumber);
#line default
#line hidden
#line 364 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 325 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -1139,13 +1085,13 @@ WriteLiteral(">\r\n");
WriteLiteral(" </span>\r\n");
#line 367 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 328 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 367 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 328 "..\..\Views\User\UserParts\_Subject.cshtml"
if (!string.IsNullOrWhiteSpace(assignment.Device.ComputerName))
{
@@ -1161,7 +1107,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_ComputerName\
WriteLiteral(">");
#line 369 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 330 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.ComputerName);
@@ -1172,7 +1118,7 @@ WriteLiteral("</span>)");
WriteLiteral("\r\n");
#line 370 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 331 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -1182,13 +1128,13 @@ WriteLiteral(" </td>\r\n
" </tr>\r\n");
#line 373 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 334 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 373 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 334 "..\..\Views\User\UserParts\_Subject.cshtml"
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
{
@@ -1205,7 +1151,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Asset\"");
WriteLiteral(">");
#line 378 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 339 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.AssetNumber);
@@ -1215,7 +1161,7 @@ WriteLiteral("</span>\r\n
" </tr>\r\n");
#line 381 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 342 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -1224,7 +1170,7 @@ WriteLiteral("</span>\r\n
WriteLiteral(" ");
#line 382 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 343 "..\..\Views\User\UserParts\_Subject.cshtml"
if (assignment.Device.DeviceModelId.HasValue)
{
@@ -1243,7 +1189,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Model\"");
WriteLiteral(">");
#line 389 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 350 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.DeviceModel.ToString());
@@ -1253,7 +1199,7 @@ WriteLiteral("</span>\r\n
" </tr>\r\n");
#line 392 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 353 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -1271,7 +1217,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Profile\"");
WriteLiteral(">");
#line 398 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 359 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.DeviceProfile.ToString());
@@ -1281,13 +1227,13 @@ WriteLiteral("</span>\r\n
" </tr>\r\n");
#line 401 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 362 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 401 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 362 "..\..\Views\User\UserParts\_Subject.cshtml"
if (assignment.Device.DeviceBatchId.HasValue)
{
@@ -1306,7 +1252,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Batch\"");
WriteLiteral(">");
#line 408 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 369 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.DeviceBatch.ToString());
@@ -1316,7 +1262,7 @@ WriteLiteral("</span>\r\n
" </tr>\r\n");
#line 411 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 372 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -1332,7 +1278,7 @@ WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Assigned\"");
WriteLiteral(">");
#line 415 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 376 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
@@ -1348,7 +1294,7 @@ WriteLiteral(@"</span>
");
#line 422 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 383 "..\..\Views\User\UserParts\_Subject.cshtml"
}
}
else
@@ -1364,7 +1310,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">No Current Device Assignments</span>\r\n");
#line 427 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 388 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -1374,7 +1320,7 @@ WriteLiteral(" </div>\r\n </div>\r\n
"\r\n");
#line 431 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 392 "..\..\Views\User\UserParts\_Subject.cshtml"
}