Feature: Quick Search
Device/Job/User Search refactoring. Quick-Search implemented.
This commit is contained in:
@@ -45,7 +45,8 @@ namespace Disco.Web
|
||||
// Initialize User Service Interop
|
||||
Disco.Services.Users.UserService.Initialize(Database,
|
||||
(UserId, AdditionalProperties) => Disco.BI.Interop.ActiveDirectory.ActiveDirectory.GetUserAccount(UserId, AdditionalProperties),
|
||||
(UserId, AdditionalProperties) => Disco.BI.Interop.ActiveDirectory.ActiveDirectory.GetMachineAccount(UserId, null, null, AdditionalProperties));
|
||||
(UserId, AdditionalProperties) => Disco.BI.Interop.ActiveDirectory.ActiveDirectory.GetMachineAccount(UserId, null, null, AdditionalProperties),
|
||||
(Term) => Disco.BI.Interop.ActiveDirectory.ActiveDirectory.SearchUsers(Term));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ namespace Disco.Web
|
||||
routes.MapRoute(
|
||||
name: "SearchQuery",
|
||||
url: "Search/Query/{SearchQuery}",
|
||||
defaults: new { controller = "Search", action = "Query", SearchQuery = UrlParameter.Optional }
|
||||
defaults: new { controller = "Search", action = "Query", SearchQuery = UrlParameter.Optional },
|
||||
namespaces: new string[] { "Disco.Web.Controllers" } // Controllers Namespace Only
|
||||
);
|
||||
// User Route
|
||||
routes.MapRoute(
|
||||
|
||||
@@ -35,7 +35,8 @@ namespace Disco.Web.Areas.API
|
||||
context.MapRoute(
|
||||
"API_default",
|
||||
"API/{controller}/{action}/{id}",
|
||||
new { id = UrlParameter.Optional }
|
||||
new { id = UrlParameter.Optional },
|
||||
new string[] { "Disco.Web.Areas.API.Controllers" }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,13 +324,13 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
switch (searchScope)
|
||||
{
|
||||
case DocumentTemplate.DocumentTemplateScopes.Device:
|
||||
results = BI.DeviceBI.Searching.Search(Database, term, limitCount).Select(sr => Models.DocumentTemplate.ImporterUndetectedDataIdLookupModel.FromSearchResultItem(sr)).ToArray();
|
||||
results = Disco.Services.Searching.Search.SearchDevices(Database, term, limitCount).Select(sr => Models.DocumentTemplate.ImporterUndetectedDataIdLookupModel.FromSearchResultItem(sr)).ToArray();
|
||||
break;
|
||||
case DocumentTemplate.DocumentTemplateScopes.Job:
|
||||
results = BI.JobBI.Searching.Search(Database, term, limitCount, false).Items.Select(sr => Models.DocumentTemplate.ImporterUndetectedDataIdLookupModel.FromSearchResultItem(sr)).ToArray();
|
||||
results = Disco.Services.Searching.Search.SearchJobsTable(Database, term, limitCount, false).Items.Select(sr => Models.DocumentTemplate.ImporterUndetectedDataIdLookupModel.FromSearchResultItem(sr)).ToArray();
|
||||
break;
|
||||
case DocumentTemplate.DocumentTemplateScopes.User:
|
||||
results = BI.UserBI.Searching.Search(Database, term, limitCount).Select(sr => Models.DocumentTemplate.ImporterUndetectedDataIdLookupModel.FromSearchResultItem(sr)).ToArray();
|
||||
results = Disco.Services.Searching.Search.SearchUsers(Database, term, limitCount).Select(sr => Models.DocumentTemplate.ImporterUndetectedDataIdLookupModel.FromSearchResultItem(sr)).ToArray();
|
||||
break;
|
||||
default:
|
||||
results = null;
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
using Disco.Models.Services.Searching;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Searching;
|
||||
using Disco.Services.Web;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public partial class SearchController : AuthorizedDatabaseController
|
||||
{
|
||||
[DiscoAuthorizeAny(Claims.Job.Search, Claims.Device.Search, Claims.User.Search)]
|
||||
public virtual ActionResult QuickQuery(string Term, int Limit = 15)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Term))
|
||||
throw new ArgumentNullException("Term", "The search query term is required");
|
||||
if (Term.Length < 2)
|
||||
throw new ArgumentException("The search query term must be at least two characters", "Term");
|
||||
if (Limit < 1)
|
||||
throw new ArgumentException("The search query limit cannot be less than 1", "Limit");
|
||||
|
||||
IEnumerable<ISearchResultItem> results = Enumerable.Empty<ISearchResultItem>();
|
||||
|
||||
if (Authorization.Has(Claims.Job.Search))
|
||||
{
|
||||
var jobMatches = Search.SearchJobs(Database, Term, Limit);
|
||||
results = results.Concat(jobMatches);
|
||||
}
|
||||
|
||||
if (Authorization.Has(Claims.User.Search))
|
||||
{
|
||||
var userMatches = Search.SearchUsers(Database, Term, Limit);
|
||||
results = results.Concat(userMatches);
|
||||
}
|
||||
|
||||
if (Authorization.Has(Claims.Device.Search))
|
||||
{
|
||||
var deviceMatches = Search.SearchDevices(Database, Term, Limit);
|
||||
results = results.Concat(deviceMatches);
|
||||
}
|
||||
|
||||
results = results.OrderByDescending(i => i.ScoreValue.Score(Term, .5)).Take(Limit);
|
||||
|
||||
return Json(results, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[DiscoAuthorize(Claims.User.Search)]
|
||||
public virtual ActionResult UpstreamUsers(string term)
|
||||
{
|
||||
return Json(BI.UserBI.Searching.SearchUpstream(term), JsonRequestBehavior.AllowGet);
|
||||
return Json(Disco.Services.Searching.Search.SearchUsersUpstream(term), JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
#region User Attachements
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Disco.Models.BI.Search;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.Services.Searching;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -12,20 +12,20 @@ namespace Disco.Web.Areas.API.Models.DocumentTemplate
|
||||
public string value { get; set; }
|
||||
public string label { get; set; }
|
||||
|
||||
public static ImporterUndetectedDataIdLookupModel FromSearchResultItem(Disco.Models.BI.Search.DeviceSearchResultItem item)
|
||||
public static ImporterUndetectedDataIdLookupModel FromSearchResultItem(DeviceSearchResultItem item)
|
||||
{
|
||||
return new ImporterUndetectedDataIdLookupModel
|
||||
{
|
||||
value = item.SerialNumber,
|
||||
label = string.Format("{0} - {1} - {2}", item.SerialNumber, item.ComputerName, item.DeviceModelDescription)
|
||||
value = item.Id,
|
||||
label = string.Format("{0} - {1} - {2}", item.Id, item.ComputerName, item.DeviceModelDescription)
|
||||
};
|
||||
}
|
||||
public static ImporterUndetectedDataIdLookupModel FromSearchResultItem(JobTableItemModel item)
|
||||
{
|
||||
return new ImporterUndetectedDataIdLookupModel
|
||||
{
|
||||
value = item.Id.ToString(),
|
||||
label = string.Format("{0} ({1}; {2})", item.Id, item.DeviceSerialNumber, item.UserDisplayName)
|
||||
value = item.JobId.ToString(),
|
||||
label = string.Format("{0} ({1}; {2})", item.JobId, item.DeviceSerialNumber, item.UserDisplayName)
|
||||
};
|
||||
}
|
||||
public static ImporterUndetectedDataIdLookupModel FromSearchResultItem(UserSearchResultItem item)
|
||||
|
||||
@@ -41936,13 +41936,76 @@ jQuery.fn.DataTable.defaults.aLengthMenu = [[10, 20, 50, -1], [10, 20, 50, "All"
|
||||
$(function () {
|
||||
|
||||
// Search Functionality
|
||||
var quickSearchInited = false;
|
||||
$('#SearchQuery').watermark('Search').keypress(function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
$(this).closest('form').submit();
|
||||
return false;
|
||||
}
|
||||
}).focus(function () {
|
||||
$(this).select();
|
||||
$this = $(this);
|
||||
$this.select();
|
||||
|
||||
if (!quickSearchInited) {
|
||||
var quickSearchUrl = $this.attr('data-quicksearchurl');
|
||||
if (quickSearchUrl) {
|
||||
$this.autocomplete({
|
||||
source: quickSearchUrl,
|
||||
minLength: 2,
|
||||
select: function (e, ui) {
|
||||
$this.val(ui.item.tag);
|
||||
$this.closest('form').submit();
|
||||
},
|
||||
response: function (e, ui) {
|
||||
for (var i = 0; i < ui.content.length; i++) {
|
||||
var item = ui.content[i];
|
||||
switch (item.Type) {
|
||||
case 'Device':
|
||||
item.tag = '!' + item.Id;
|
||||
break;
|
||||
case 'Job':
|
||||
item.tag = '#' + item.Id;
|
||||
break;
|
||||
case 'User':
|
||||
item.tag = '@' + item.Id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}).autocomplete("widget").attr('id', 'QuickSearchMenu');
|
||||
|
||||
$this.data('ui-autocomplete')._renderItem = function (ul, item) {
|
||||
var template;
|
||||
|
||||
//"<a><strong>" + item.DisplayName + "</strong><br>" + item.Id + " (" + item.Type + ")</a>"
|
||||
|
||||
switch (item.Type) {
|
||||
case 'Device':
|
||||
template = $('<a>').append('<i class="fa fa-desktop fa-fw">').append($('<strong>').text('Device ' + item.Id)).append($('<div>').text(item.ComputerName + '; ' + item.DeviceModelDescription))
|
||||
break;
|
||||
case 'Job':
|
||||
if (item.DeviceSerialNumber && item.UserId) {
|
||||
template = $('<a>').append('<i class="fa fa-question-circle fa-fw">').append($('<strong>').text('Job ' + item.Id)).append($('<div>').text(item.UserId + '; ' + item.DeviceSerialNumber))
|
||||
} else if (item.DeviceSerialNumber) {
|
||||
template = $('<a>').append('<i class="fa fa-question-circle fa-fw">').append($('<strong>').text('Job ' + item.Id)).append($('<div>').text(item.DeviceSerialNumber))
|
||||
} else if (item.UserId) {
|
||||
template = $('<a>').append('<i class="fa fa-question-circle fa-fw">').append($('<strong>').text('Job ' + item.Id)).append($('<div>').text(item.UserId))
|
||||
}
|
||||
break;
|
||||
case 'User':
|
||||
template = $('<a>').append('<i class="fa fa-user fa-fw">').append($('<strong>').text(item.DisplayName)).append($('<div>').text(item.Id))
|
||||
break;
|
||||
}
|
||||
|
||||
return $("<li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append(template)
|
||||
.appendTo(ul);
|
||||
};
|
||||
|
||||
}
|
||||
quickSearchInited = true;
|
||||
}
|
||||
});
|
||||
|
||||
// Menu Functionality
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -4,13 +4,76 @@
|
||||
$(function () {
|
||||
|
||||
// Search Functionality
|
||||
var quickSearchInited = false;
|
||||
$('#SearchQuery').watermark('Search').keypress(function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
$(this).closest('form').submit();
|
||||
return false;
|
||||
}
|
||||
}).focus(function () {
|
||||
$(this).select();
|
||||
$this = $(this);
|
||||
$this.select();
|
||||
|
||||
if (!quickSearchInited) {
|
||||
var quickSearchUrl = $this.attr('data-quicksearchurl');
|
||||
if (quickSearchUrl) {
|
||||
$this.autocomplete({
|
||||
source: quickSearchUrl,
|
||||
minLength: 2,
|
||||
select: function (e, ui) {
|
||||
$this.val(ui.item.tag);
|
||||
$this.closest('form').submit();
|
||||
},
|
||||
response: function (e, ui) {
|
||||
for (var i = 0; i < ui.content.length; i++) {
|
||||
var item = ui.content[i];
|
||||
switch (item.Type) {
|
||||
case 'Device':
|
||||
item.tag = '!' + item.Id;
|
||||
break;
|
||||
case 'Job':
|
||||
item.tag = '#' + item.Id;
|
||||
break;
|
||||
case 'User':
|
||||
item.tag = '@' + item.Id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}).autocomplete("widget").attr('id', 'QuickSearchMenu');
|
||||
|
||||
$this.data('ui-autocomplete')._renderItem = function (ul, item) {
|
||||
var template;
|
||||
|
||||
//"<a><strong>" + item.DisplayName + "</strong><br>" + item.Id + " (" + item.Type + ")</a>"
|
||||
|
||||
switch (item.Type) {
|
||||
case 'Device':
|
||||
template = $('<a>').append('<i class="fa fa-desktop fa-fw">').append($('<strong>').text('Device ' + item.Id)).append($('<div>').text(item.ComputerName + '; ' + item.DeviceModelDescription))
|
||||
break;
|
||||
case 'Job':
|
||||
if (item.DeviceSerialNumber && item.UserId) {
|
||||
template = $('<a>').append('<i class="fa fa-question-circle fa-fw">').append($('<strong>').text('Job ' + item.Id)).append($('<div>').text(item.UserId + '; ' + item.DeviceSerialNumber))
|
||||
} else if (item.DeviceSerialNumber) {
|
||||
template = $('<a>').append('<i class="fa fa-question-circle fa-fw">').append($('<strong>').text('Job ' + item.Id)).append($('<div>').text(item.DeviceSerialNumber))
|
||||
} else if (item.UserId) {
|
||||
template = $('<a>').append('<i class="fa fa-question-circle fa-fw">').append($('<strong>').text('Job ' + item.Id)).append($('<div>').text(item.UserId))
|
||||
}
|
||||
break;
|
||||
case 'User':
|
||||
template = $('<a>').append('<i class="fa fa-user fa-fw">').append($('<strong>').text(item.DisplayName)).append($('<div>').text(item.Id))
|
||||
break;
|
||||
}
|
||||
|
||||
return $("<li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append(template)
|
||||
.appendTo(ul);
|
||||
};
|
||||
|
||||
}
|
||||
quickSearchInited = true;
|
||||
}
|
||||
});
|
||||
|
||||
// Menu Functionality
|
||||
|
||||
@@ -3492,6 +3492,25 @@ header .watermark,
|
||||
#header .watermark {
|
||||
background-color: #888;
|
||||
}
|
||||
#QuickSearchMenu {
|
||||
max-height: 400px;
|
||||
font-size: .9em;
|
||||
background: none;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
#QuickSearchMenu li:not(:last-child) {
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
}
|
||||
#QuickSearchMenu li > a {
|
||||
padding: 2px;
|
||||
}
|
||||
#QuickSearchMenu li > a > i {
|
||||
margin-right: 2px;
|
||||
}
|
||||
#QuickSearchMenu li > a > div {
|
||||
padding-left: 1.2857142857142858em;
|
||||
margin-left: 2px;
|
||||
}
|
||||
#layout_PageHeading {
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAA8CAYAAABfESsNAAAAOUlEQVRIx+2SuREAIAzDFELL/uOSFVLx3Mm1C8nnABaNDJq5WJzAVkZGZXyPMg7+jUwCIeNZmdcZC2pxCZOpoRNgAAAAAElFTkSuQmCC) /*Images/BackgroundPage.png*/ left top repeat-x #ffffff;
|
||||
background: linear-gradient(to bottom, #f2f2f2 0px, #ffffff 50px) #ffffff;
|
||||
@@ -4509,7 +4528,6 @@ input:-moz-placeholder {
|
||||
overflow-x: hidden;
|
||||
/* add padding to account for vertical scrollbar */
|
||||
|
||||
padding-right: 20px;
|
||||
}
|
||||
/* IE 6 doesn't support max-height
|
||||
* we use height instead, but this forces the menu to always be this tall
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -291,6 +291,25 @@ header .watermark,
|
||||
#header .watermark {
|
||||
background-color: #888;
|
||||
}
|
||||
#QuickSearchMenu {
|
||||
max-height: 400px;
|
||||
font-size: .9em;
|
||||
background: none;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
#QuickSearchMenu li:not(:last-child) {
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
}
|
||||
#QuickSearchMenu li > a {
|
||||
padding: 2px;
|
||||
}
|
||||
#QuickSearchMenu li > a > i {
|
||||
margin-right: 2px;
|
||||
}
|
||||
#QuickSearchMenu li > a > div {
|
||||
padding-left: 1.2857142857142858em;
|
||||
margin-left: 2px;
|
||||
}
|
||||
#layout_PageHeading {
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAA8CAYAAABfESsNAAAAOUlEQVRIx+2SuREAIAzDFELL/uOSFVLx3Mm1C8nnABaNDJq5WJzAVkZGZXyPMg7+jUwCIeNZmdcZC2pxCZOpoRNgAAAAAElFTkSuQmCC) /*Images/BackgroundPage.png*/ left top repeat-x #ffffff;
|
||||
background: linear-gradient(to bottom, #f2f2f2 0px, #ffffff 50px) #ffffff;
|
||||
|
||||
@@ -112,6 +112,7 @@ header, #header {
|
||||
&:first-child {
|
||||
border-top: 1px solid @BackgroundColour;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom: 1px solid @BackgroundColour;
|
||||
}
|
||||
@@ -215,6 +216,31 @@ header, #header {
|
||||
}
|
||||
}
|
||||
|
||||
#QuickSearchMenu {
|
||||
max-height: 400px;
|
||||
font-size: .9em;
|
||||
background: none;
|
||||
background-color: @BackgroundColourLight;
|
||||
|
||||
li {
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1px solid @TableDataDarkBorderColour;
|
||||
}
|
||||
|
||||
& > a {
|
||||
padding: 2px;
|
||||
& > i {
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
& > div {
|
||||
padding-left: 1.2857142857142858em;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#layout_PageHeading {
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAA8CAYAAABfESsNAAAAOUlEQVRIx+2SuREAIAzDFELL/uOSFVLx3Mm1C8nnABaNDJq5WJzAVkZGZXyPMg7+jUwCIeNZmdcZC2pxCZOpoRNgAAAAAElFTkSuQmCC) /*Images/BackgroundPage.png*/ left top repeat-x @white;
|
||||
background: linear-gradient(to bottom, @BackgroundColourGradient 0px, @white 50px) @white;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -106,7 +106,6 @@ input:-moz-placeholder {
|
||||
overflow-x: hidden;
|
||||
/* add padding to account for vertical scrollbar */
|
||||
|
||||
padding-right: 20px;
|
||||
}
|
||||
/* IE 6 doesn't support max-height
|
||||
* we use height instead, but this forces the menu to always be this tall
|
||||
|
||||
@@ -32,7 +32,7 @@ input:-moz-placeholder {
|
||||
/* prevent horizontal scrollbar */
|
||||
overflow-x: hidden;
|
||||
/* add padding to account for vertical scrollbar */
|
||||
padding-right: 20px;
|
||||
//padding-right: 20px;
|
||||
}
|
||||
/* IE 6 doesn't support max-height
|
||||
* we use height instead, but this forces the menu to always be this tall
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -160,7 +160,7 @@ namespace Disco.Web.Controllers
|
||||
HideClosedJobs = true,
|
||||
EnablePaging = false
|
||||
};
|
||||
m.Jobs.Fill(Database, BI.JobBI.Searching.BuildJobTableModel(Database).Where(j => j.DeviceSerialNumber == m.Device.SerialNumber).OrderByDescending(j => j.Id), true);
|
||||
m.Jobs.Fill(Database, Disco.Services.Searching.Search.BuildJobTableModel(Database).Where(j => j.DeviceSerialNumber == m.Device.SerialNumber).OrderByDescending(j => j.Id), true);
|
||||
}
|
||||
|
||||
if (Authorization.Has(Claims.Device.ShowCertificates))
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Disco.Web.Controllers
|
||||
if (Authorization.Has(Claims.Job.Lists.LongRunningJobs))
|
||||
{
|
||||
var longRunningThreshold = DateTime.Today.AddDays(Database.DiscoConfiguration.JobPreferences.LongRunningJobDaysThreshold * -1);
|
||||
m.LongRunningJobs = ManagedJobList.OpenJobsTable(q => q.Where(j => j.OpenedDate < longRunningThreshold).OrderBy(j => j.Id));
|
||||
m.LongRunningJobs = ManagedJobList.OpenJobsTable(q => q.Where(j => j.OpenedDate < longRunningThreshold).OrderBy(j => j.JobId));
|
||||
}
|
||||
if (Authorization.Has(Claims.Job.ShowDailyChart))
|
||||
m.DailyOpenedClosedStatistics = Disco.BI.JobBI.Statistics.DailyOpenedClosed.Data(Database, true);
|
||||
@@ -68,7 +68,7 @@ namespace Disco.Web.Controllers
|
||||
public virtual ActionResult AllOpen()
|
||||
{
|
||||
var m = new Models.Job.ListModel() { Title = "All Open Jobs" };
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.OrderBy(j => j.Id));
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.OrderBy(j => j.JobId));
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
|
||||
@@ -97,7 +97,7 @@ namespace Disco.Web.Controllers
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => !j.WaitingForUserAction.HasValue
|
||||
&& j.DeviceHeld != null && j.DeviceReturnedDate == null && j.DeviceReadyForReturn != null &&
|
||||
((!j.JobMetaNonWarranty_AccountingChargeRequiredDate.HasValue && !j.JobMetaNonWarranty_AccountingChargeAddedDate.HasValue) || j.JobMetaNonWarranty_AccountingChargePaidDate.HasValue))
|
||||
.OrderBy(j => j.Id));
|
||||
.OrderBy(j => j.JobId));
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
|
||||
@@ -113,7 +113,7 @@ namespace Disco.Web.Controllers
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j =>
|
||||
(j.JobMetaNonWarranty_RepairerLoggedDate != null && j.JobMetaNonWarranty_RepairerCompletedDate == null) ||
|
||||
(j.JobMetaWarranty_ExternalLoggedDate != null && j.JobMetaWarranty_ExternalCompletedDate == null)
|
||||
).OrderBy(j => j.Id));
|
||||
).OrderBy(j => j.JobId));
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
|
||||
@@ -145,7 +145,7 @@ namespace Disco.Web.Controllers
|
||||
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Accounting Charge" };
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j =>
|
||||
j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty_AccountingChargeRequiredDate.HasValue && (!j.JobMetaNonWarranty_AccountingChargeAddedDate.HasValue && !j.JobMetaNonWarranty_AccountingChargePaidDate.HasValue))
|
||||
).OrderBy(j => j.Id));
|
||||
).OrderBy(j => j.JobId));
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
|
||||
@@ -159,7 +159,7 @@ namespace Disco.Web.Controllers
|
||||
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Accounting Payment" };
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j =>
|
||||
j.JobTypeId == JobType.JobTypeIds.HNWar && ((j.JobMetaNonWarranty_AccountingChargeRequiredDate.HasValue || j.JobMetaNonWarranty_AccountingChargeAddedDate.HasValue) && !j.JobMetaNonWarranty_AccountingChargePaidDate.HasValue)
|
||||
).OrderBy(j => j.Id));
|
||||
).OrderBy(j => j.JobId));
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
|
||||
@@ -173,7 +173,7 @@ namespace Disco.Web.Controllers
|
||||
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Insurance Processing" };
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j =>
|
||||
j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty_IsInsuranceClaim.Value && !j.JobMetaInsurance_ClaimFormSentDate.HasValue)
|
||||
).OrderBy(j => j.Id));
|
||||
).OrderBy(j => j.JobId));
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
|
||||
@@ -187,7 +187,7 @@ namespace Disco.Web.Controllers
|
||||
var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Agreement Breach" };
|
||||
m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j =>
|
||||
j.JobTypeId == JobType.JobTypeIds.UMgmt && Job.UserManagementFlags.Infringement_BreachFinancialAgreement == (j.Flags & Job.UserManagementFlags.Infringement_BreachFinancialAgreement)
|
||||
).OrderBy(j => j.Id));
|
||||
).OrderBy(j => j.JobId));
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
|
||||
@@ -204,7 +204,7 @@ namespace Disco.Web.Controllers
|
||||
j.WaitingForUserAction.HasValue ||
|
||||
(j.JobMetaNonWarranty_AccountingChargeAddedDate != null && j.JobMetaNonWarranty_AccountingChargePaidDate == null) ||
|
||||
(j.JobMetaNonWarranty_AccountingChargeRequiredDate != null && j.JobMetaNonWarranty_AccountingChargePaidDate == null)
|
||||
).OrderBy(j => j.Id));
|
||||
).OrderBy(j => j.JobId));
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
|
||||
@@ -224,7 +224,7 @@ namespace Disco.Web.Controllers
|
||||
closedThreshold = closedThreshold.AddDays(-2);
|
||||
if (dateTimeNow.DayOfWeek == DayOfWeek.Tuesday)
|
||||
closedThreshold = closedThreshold.AddDays(-1);
|
||||
m.JobTable.Fill(Database, BI.JobBI.Searching.BuildJobTableModel(Database).Where(j => j.ClosedDate > closedThreshold).OrderBy(j => j.Id), true);
|
||||
m.JobTable.Fill(Database, Disco.Services.Searching.Search.BuildJobTableModel(Database).Where(j => j.ClosedDate > closedThreshold).OrderBy(j => j.Id), true);
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m);
|
||||
|
||||
@@ -62,13 +62,13 @@ namespace Disco.Web.Controllers
|
||||
return View(m);
|
||||
}
|
||||
if (Authorization.Has(Claims.Job.Search))
|
||||
m.Jobs = BI.JobBI.Searching.Search(Database, term, null, true, searchDetails);
|
||||
m.Jobs = Services.Searching.Search.SearchJobsTable(Database, term, null, true, searchDetails);
|
||||
|
||||
if (Authorization.Has(Claims.Device.Search))
|
||||
m.Devices = BI.DeviceBI.Searching.Search(Database, term, null, searchDetails);
|
||||
m.Devices = Services.Searching.Search.SearchDevices(Database, term, null, searchDetails);
|
||||
|
||||
if (Authorization.Has(Claims.User.Search))
|
||||
m.Users = BI.UserBI.Searching.Search(Database, term);
|
||||
m.Users = Services.Searching.Search.SearchUsers(Database, term);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -83,7 +83,7 @@ namespace Disco.Web.Controllers
|
||||
if (vm != null)
|
||||
{
|
||||
m.FriendlyTerm = string.Format("Device Model: {0}", vm.ToString());
|
||||
m.Devices = BI.DeviceBI.Searching.SearchDeviceModel(Database, vm.Id);
|
||||
m.Devices = Services.Searching.Search.SearchDeviceModel(Database, vm.Id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ namespace Disco.Web.Controllers
|
||||
if (dp != null)
|
||||
{
|
||||
m.FriendlyTerm = string.Format("Device Profile: {0}", dp.ToString());
|
||||
m.Devices = BI.DeviceBI.Searching.SearchDeviceProfile(Database, dp.Id);
|
||||
m.Devices = Services.Searching.Search.SearchDeviceProfile(Database, dp.Id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ namespace Disco.Web.Controllers
|
||||
if (db != null)
|
||||
{
|
||||
m.FriendlyTerm = string.Format("Device Batch: {0}", db.ToString());
|
||||
m.Devices = BI.DeviceBI.Searching.SearchDeviceBatch(Database, db.Id);
|
||||
m.Devices = Services.Searching.Search.SearchDeviceBatch(Database, db.Id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -133,10 +133,10 @@ namespace Disco.Web.Controllers
|
||||
m.ErrorMessage = "A search term of at least two characters is required";
|
||||
return View(m);
|
||||
}
|
||||
m.Devices = BI.DeviceBI.Searching.Search(Database, term, null, searchDetails);
|
||||
m.Devices = Services.Searching.Search.SearchDevices(Database, term, null, searchDetails);
|
||||
if (m.Devices.Count == 1)
|
||||
{
|
||||
return RedirectToAction(MVC.Device.Show(m.Devices[0].SerialNumber));
|
||||
return RedirectToAction(MVC.Device.Show(m.Devices[0].Id));
|
||||
}
|
||||
break;
|
||||
case "jobs":
|
||||
@@ -154,7 +154,7 @@ namespace Disco.Web.Controllers
|
||||
return RedirectToAction(MVC.Job.Show(termInt));
|
||||
}
|
||||
}
|
||||
m.Jobs = BI.JobBI.Searching.Search(Database, term, null, true, searchDetails);
|
||||
m.Jobs = Services.Searching.Search.SearchJobsTable(Database, term, null, true, searchDetails);
|
||||
break;
|
||||
case "users":
|
||||
Authorization.Require(Claims.User.Search);
|
||||
@@ -164,7 +164,7 @@ namespace Disco.Web.Controllers
|
||||
m.ErrorMessage = "A search term of at least two characters is required";
|
||||
return View(m);
|
||||
}
|
||||
m.Users = BI.UserBI.Searching.Search(Database, term);
|
||||
m.Users = Services.Searching.Search.SearchUsers(Database, term);
|
||||
if (m.Users.Count == 1)
|
||||
{
|
||||
return RedirectToAction(MVC.User.Show(m.Users[0].Id));
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Disco.Web.Controllers
|
||||
HideClosedJobs = true,
|
||||
EnablePaging = false
|
||||
};
|
||||
m.Jobs.Fill(Database, BI.JobBI.Searching.BuildJobTableModel(Database).Where(j => j.UserId == id).OrderByDescending(j => j.Id), true);
|
||||
m.Jobs.Fill(Database, Disco.Services.Searching.Search.BuildJobTableModel(Database).Where(j => j.UserId == id).OrderByDescending(j => j.Id), true);
|
||||
}
|
||||
|
||||
try
|
||||
|
||||
@@ -192,6 +192,7 @@
|
||||
<Compile Include="Areas\API\Controllers\JobQueueController.cs" />
|
||||
<Compile Include="Areas\API\Controllers\JobQueueJobController.cs" />
|
||||
<Compile Include="Areas\API\Controllers\PluginController.cs" />
|
||||
<Compile Include="Areas\API\Controllers\SearchController.cs" />
|
||||
<Compile Include="Areas\API\Models\AuthorizationRole\SubjectItem.cs" />
|
||||
<Compile Include="Areas\API\Models\JobQueue\SubjectItem.cs" />
|
||||
<Compile Include="Areas\Config\Controllers\AuthorizationRoleController.cs" />
|
||||
@@ -1957,6 +1958,7 @@
|
||||
<None Include="_bin_deployableAssemblies\x86\Microsoft.VC90.CRT\Microsoft.VC90.CRT.manifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Areas\API\Models\Search\" />
|
||||
<Folder Include="Areas\API\Models\WirelessCertificate\" />
|
||||
<Folder Include="Areas\Services\Models\" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Disco.Models.BI.Search;
|
||||
using Disco.Models.Services.Searching;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Models.UI.Search;
|
||||
using System.Collections.Generic;
|
||||
|
||||
+106
-7
@@ -63,6 +63,7 @@ namespace T4MVC
|
||||
public Disco.Web.Areas.API.Controllers.JobQueueJobController JobQueueJob = new Disco.Web.Areas.API.Controllers.T4MVC_JobQueueJobController();
|
||||
public Disco.Web.Areas.API.Controllers.LoggingController Logging = new Disco.Web.Areas.API.Controllers.T4MVC_LoggingController();
|
||||
public Disco.Web.Areas.API.Controllers.PluginController Plugin = new Disco.Web.Areas.API.Controllers.T4MVC_PluginController();
|
||||
public Disco.Web.Areas.API.Controllers.SearchController Search = new Disco.Web.Areas.API.Controllers.T4MVC_SearchController();
|
||||
public Disco.Web.Areas.API.Controllers.SystemController System = new Disco.Web.Areas.API.Controllers.T4MVC_SystemController();
|
||||
public Disco.Web.Areas.API.Controllers.UserController User = new Disco.Web.Areas.API.Controllers.T4MVC_UserController();
|
||||
}
|
||||
@@ -474,7 +475,7 @@ namespace Links
|
||||
private const string URLPATH = "~/ClientSource/Style";
|
||||
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
|
||||
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
|
||||
public static readonly string BundleSite_css_bundle = Url("BundleSite.css.bundle");
|
||||
public static readonly string BundleSite_less = Url("BundleSite.less");
|
||||
public static readonly string BundleSite_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/BundleSite.min.css") ? Url("BundleSite.min.css") : Url("BundleSite.css");
|
||||
|
||||
public static readonly string BundleSite_min_css = Url("BundleSite.min.css");
|
||||
@@ -549,8 +550,7 @@ namespace Links
|
||||
private const string URLPATH = "~/ClientSource/Style/FontAwesome";
|
||||
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
|
||||
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
|
||||
public static readonly string font_awesome_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/font-awesome.min.css") ? Url("font-awesome.min.css") : Url("font-awesome.css");
|
||||
|
||||
public static readonly string font_awesome_less = Url("font-awesome.less");
|
||||
public static readonly string fontawesome_webfont_eot = Url("fontawesome-webfont.eot");
|
||||
public static readonly string fontawesome_webfont_svg = Url("fontawesome-webfont.svg");
|
||||
public static readonly string fontawesome_webfont_ttf = Url("fontawesome-webfont.ttf");
|
||||
@@ -678,16 +678,17 @@ namespace Links
|
||||
public static readonly string ui_icons_cd0a0a_256x240_png = Url("ui-icons_cd0a0a_256x240.png");
|
||||
}
|
||||
|
||||
public static readonly string jquery_ui_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/jquery-ui.min.css") ? Url("jquery-ui.min.css") : Url("jquery-ui.css");
|
||||
|
||||
public static readonly string old_jquery_ui_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/old_jquery-ui.min.css") ? Url("old_jquery-ui.min.css") : Url("old_jquery-ui.css");
|
||||
|
||||
public static readonly string jquery_ui_less = Url("jquery-ui.less");
|
||||
}
|
||||
|
||||
public static readonly string jQueryUIExtensions_less = Url("jQueryUIExtensions.less");
|
||||
public static readonly string jQueryUIExtensions_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/jQueryUIExtensions.min.css") ? Url("jQueryUIExtensions.min.css") : Url("jQueryUIExtensions.css");
|
||||
|
||||
public static readonly string jQueryUIExtensions_min_css = Url("jQueryUIExtensions.min.css");
|
||||
public static readonly string normalize_less = Url("normalize.less");
|
||||
public static readonly string normalize_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/normalize.min.css") ? Url("normalize.min.css") : Url("normalize.css");
|
||||
|
||||
public static readonly string normalize_min_css = Url("normalize.min.css");
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public static class Public {
|
||||
private const string URLPATH = "~/ClientSource/Style/Public";
|
||||
@@ -8883,6 +8884,104 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public partial class SearchController
|
||||
{
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public SearchController() { }
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
protected SearchController(Dummy d) { }
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
protected RedirectToRouteResult RedirectToAction(ActionResult result)
|
||||
{
|
||||
var callInfo = result.GetT4MVCResult();
|
||||
return RedirectToRoute(callInfo.RouteValueDictionary);
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
protected RedirectToRouteResult RedirectToActionPermanent(ActionResult result)
|
||||
{
|
||||
var callInfo = result.GetT4MVCResult();
|
||||
return RedirectToRoutePermanent(callInfo.RouteValueDictionary);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public virtual System.Web.Mvc.ActionResult QuickQuery()
|
||||
{
|
||||
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.QuickQuery);
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public SearchController Actions { get { return MVC.API.Search; } }
|
||||
[GeneratedCode("T4MVC", "2.0")]
|
||||
public readonly string Area = "API";
|
||||
[GeneratedCode("T4MVC", "2.0")]
|
||||
public readonly string Name = "Search";
|
||||
[GeneratedCode("T4MVC", "2.0")]
|
||||
public const string NameConst = "Search";
|
||||
|
||||
static readonly ActionNamesClass s_actions = new ActionNamesClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionNamesClass ActionNames { get { return s_actions; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionNamesClass
|
||||
{
|
||||
public readonly string QuickQuery = "QuickQuery";
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionNameConstants
|
||||
{
|
||||
public const string QuickQuery = "QuickQuery";
|
||||
}
|
||||
|
||||
|
||||
static readonly ActionParamsClass_QuickQuery s_params_QuickQuery = new ActionParamsClass_QuickQuery();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ActionParamsClass_QuickQuery QuickQueryParams { get { return s_params_QuickQuery; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ActionParamsClass_QuickQuery
|
||||
{
|
||||
public readonly string Term = "Term";
|
||||
public readonly string Limit = "Limit";
|
||||
}
|
||||
static readonly ViewsClass s_views = new ViewsClass();
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public ViewsClass Views { get { return s_views; } }
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public class ViewsClass
|
||||
{
|
||||
static readonly _ViewNamesClass s_ViewNames = new _ViewNamesClass();
|
||||
public _ViewNamesClass ViewNames { get { return s_ViewNames; } }
|
||||
public class _ViewNamesClass
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public partial class T4MVC_SearchController : Disco.Web.Areas.API.Controllers.SearchController
|
||||
{
|
||||
public T4MVC_SearchController() : base(Dummy.Instance) { }
|
||||
|
||||
partial void QuickQueryOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string Term, int Limit);
|
||||
|
||||
public override System.Web.Mvc.ActionResult QuickQuery(string Term, int Limit)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.QuickQuery);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Term", Term);
|
||||
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "Limit", Limit);
|
||||
QuickQueryOverride(callInfo, Term, Limit);
|
||||
return callInfo;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
public partial class SystemController
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@model IEnumerable<Disco.Models.BI.Search.DeviceSearchResultItem>
|
||||
@model IEnumerable<Disco.Models.Services.Searching.DeviceSearchResultItem>
|
||||
@{
|
||||
var canShowDevices = Authorization.Has(Claims.Device.Show);
|
||||
}
|
||||
@@ -30,9 +30,9 @@
|
||||
<tr class="@(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty)">
|
||||
<td>
|
||||
@if (canShowDevices)
|
||||
{@Html.ActionLink(item.SerialNumber, MVC.Device.Show(item.SerialNumber))}
|
||||
{@Html.ActionLink(item.Id, MVC.Device.Show(item.Id))}
|
||||
else
|
||||
{@item.SerialNumber}
|
||||
{@item.Id}
|
||||
</td>
|
||||
<td>
|
||||
@item.AssetNumber
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.Device
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
@@ -36,7 +37,7 @@ namespace Disco.Web.Views.Device
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/_DeviceTable.cshtml")]
|
||||
public partial class DeviceTable : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Models.BI.Search.DeviceSearchResultItem>>
|
||||
public partial class DeviceTable : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Models.Services.Searching.DeviceSearchResultItem>>
|
||||
{
|
||||
public DeviceTable()
|
||||
{
|
||||
@@ -113,14 +114,14 @@ WriteLiteral(@">
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 895), Tuple.Create("\"", 972)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 904), Tuple.Create("\"", 981)
|
||||
|
||||
#line 30 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 903), Tuple.Create<System.Object, System.Int32>(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty
|
||||
, Tuple.Create(Tuple.Create("", 912), Tuple.Create<System.Object, System.Int32>(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 903), false)
|
||||
, 912), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <td>\r\n");
|
||||
@@ -140,14 +141,14 @@ WriteLiteral(">\r\n <td>\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(Html.ActionLink(item.SerialNumber, MVC.Device.Show(item.SerialNumber)));
|
||||
Write(Html.ActionLink(item.Id, MVC.Device.Show(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -155,14 +156,14 @@ WriteLiteral(">\r\n <td>\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
Write(item.SerialNumber);
|
||||
Write(item.Id);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 35 "..\..\Views\Device\_DeviceTable.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
|
||||
@@ -59,9 +59,9 @@
|
||||
@if (Model.ShowId)
|
||||
{<td class="id">
|
||||
@if (Authorization.Has(Claims.Job.Show))
|
||||
{@Html.ActionLink(item.Id.ToString(), MVC.Job.Show(item.Id))}
|
||||
{@Html.ActionLink(item.JobId.ToString(), MVC.Job.Show(item.JobId))}
|
||||
else
|
||||
{@item.Id.ToString()}</td>}
|
||||
{@item.JobId.ToString()}</td>}
|
||||
@if (Model.ShowStatus)
|
||||
{
|
||||
var statusItem = (JobTableStatusItemModel)item;
|
||||
|
||||
@@ -397,14 +397,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 62 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(Html.ActionLink(item.Id.ToString(), MVC.Job.Show(item.Id)));
|
||||
Write(Html.ActionLink(item.JobId.ToString(), MVC.Job.Show(item.JobId)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 62 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -412,14 +412,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 64 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
Write(item.Id.ToString());
|
||||
Write(item.JobId.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 64 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -427,7 +427,7 @@ WriteLiteral("</td>");
|
||||
|
||||
|
||||
#line 64 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -449,17 +449,17 @@ WriteLiteral(" class=\"status\"");
|
||||
|
||||
WriteLiteral("><i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3230), Tuple.Create("\"", 3277)
|
||||
, Tuple.Create(Tuple.Create("", 3238), Tuple.Create("fa", 3238), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3240), Tuple.Create("fa-square", 3241), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3250), Tuple.Create("jobStatus", 3251), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3239), Tuple.Create("\"", 3286)
|
||||
, Tuple.Create(Tuple.Create("", 3247), Tuple.Create("fa", 3247), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3249), Tuple.Create("fa-square", 3250), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3259), Tuple.Create("jobStatus", 3260), true)
|
||||
|
||||
#line 68 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create(" ", 3260), Tuple.Create<System.Object, System.Int32>(item.StatusId
|
||||
, Tuple.Create(Tuple.Create(" ", 3269), Tuple.Create<System.Object, System.Int32>(item.StatusId
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3261), false)
|
||||
, 3270), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i> ");
|
||||
@@ -508,44 +508,44 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3809), Tuple.Create("\"", 3898)
|
||||
, Tuple.Create(Tuple.Create("", 3817), Tuple.Create("fa", 3817), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3819), Tuple.Create("fa-", 3820), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 3818), Tuple.Create("\"", 3907)
|
||||
, Tuple.Create(Tuple.Create("", 3826), Tuple.Create("fa", 3826), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3828), Tuple.Create("fa-", 3829), true)
|
||||
|
||||
#line 73 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3823), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.Icon
|
||||
, Tuple.Create(Tuple.Create("", 3832), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3823), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 3853), Tuple.Create("fa-fw", 3854), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3859), Tuple.Create("d-", 3860), true)
|
||||
, 3832), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 3862), Tuple.Create("fa-fw", 3863), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 3868), Tuple.Create("d-", 3869), true)
|
||||
|
||||
#line 73 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3862), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 3871), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3862), false)
|
||||
, 3871), false)
|
||||
);
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3899), Tuple.Create("\"", 3965)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3908), Tuple.Create("\"", 3974)
|
||||
|
||||
#line 73 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3907), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.Name
|
||||
, Tuple.Create(Tuple.Create("", 3916), Tuple.Create<System.Object, System.Int32>(jqToken.Item2.JobQueue.Name
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3907), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 3937), Tuple.Create("[", 3938), true)
|
||||
, 3916), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 3946), Tuple.Create("[", 3947), true)
|
||||
|
||||
#line 73 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3939), Tuple.Create<System.Object, System.Int32>(jqToken.Item1.Priority
|
||||
, Tuple.Create(Tuple.Create("", 3948), Tuple.Create<System.Object, System.Int32>(jqToken.Item1.Priority
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3939), false)
|
||||
, Tuple.Create(Tuple.Create("", 3964), Tuple.Create("]", 3964), true)
|
||||
, 3948), false)
|
||||
, Tuple.Create(Tuple.Create("", 3973), Tuple.Create("]", 3973), true)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
@@ -649,14 +649,14 @@ WriteLiteral(" class=\"type\"");
|
||||
|
||||
WriteLiteral("><span");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4547), Tuple.Create("\"", 4579)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 4556), Tuple.Create("\"", 4588)
|
||||
|
||||
#line 83 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 4555), Tuple.Create<System.Object, System.Int32>(item.JobTypeDescription
|
||||
, Tuple.Create(Tuple.Create("", 4564), Tuple.Create<System.Object, System.Int32>(item.JobTypeDescription
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 4555), false)
|
||||
, 4564), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -724,14 +724,14 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral("<span");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5119), Tuple.Create("\"", 5155)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 5128), Tuple.Create("\"", 5164)
|
||||
|
||||
#line 91 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 5127), Tuple.Create<System.Object, System.Int32>(item.DeviceModelDescription
|
||||
, Tuple.Create(Tuple.Create("", 5136), Tuple.Create<System.Object, System.Int32>(item.DeviceModelDescription
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 5127), false)
|
||||
, 5136), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -872,14 +872,14 @@ WriteLiteral(" class=\"technician\"");
|
||||
|
||||
WriteLiteral("><span");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6107), Tuple.Create("\"", 6146)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 6116), Tuple.Create("\"", 6155)
|
||||
|
||||
#line 107 "..\..\Views\Shared\_JobTableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6115), Tuple.Create<System.Object, System.Int32>(item.OpenedTechUserDisplayName
|
||||
, Tuple.Create(Tuple.Create("", 6124), Tuple.Create<System.Object, System.Int32>(item.OpenedTechUserDisplayName
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6115), false)
|
||||
, 6124), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
var queues = Disco.Services.Jobs.JobQueues.JobQueueService.GetQueues();
|
||||
if (queues.Count > 0)
|
||||
{
|
||||
<li class="d-sm"><i class="fa fa-caret-right"></i><a>Queues</a>
|
||||
<ul>
|
||||
@foreach (var queueToken in queues)
|
||||
{
|
||||
<li><a href="@Url.Action(MVC.Job.Queue(queueToken.JobQueue.Id))"><i class="fa fa-@(queueToken.JobQueue.Icon) fa-fw d-@(queueToken.JobQueue.IconColour)"></i> @(queueToken.JobQueue.Name)</a></li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d-sm"><i class="fa fa-caret-right"></i><a>Queues</a>
|
||||
<ul>
|
||||
@foreach (var queueToken in queues)
|
||||
{
|
||||
<li><a href="@Url.Action(MVC.Job.Queue(queueToken.JobQueue.Id))"><i class="fa fa-@(queueToken.JobQueue.Icon) fa-fw d-@(queueToken.JobQueue.IconColour)"></i>@(queueToken.JobQueue.Name)</a></li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
@if (Authorization.Has(Claims.Job.Lists.AwaitingTechnicianAction))
|
||||
@@ -98,11 +98,13 @@
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
@if (Authorization.HasAny(Claims.Device.Search, Claims.Device.Actions.Import, Claims.Device.Actions.Export, Claims.Device.Actions.EnrolDevices)){
|
||||
<li class="@((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null)">@Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2")</li>
|
||||
@if (Authorization.HasAny(Claims.Device.Search, Claims.Device.Actions.Import, Claims.Device.Actions.Export, Claims.Device.Actions.EnrolDevices))
|
||||
{
|
||||
<li class="@((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null)">@Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2")</li>
|
||||
}
|
||||
@if (Authorization.HasAny(Claims.User.Search)){
|
||||
<li class="@((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null)">@Html.ActionLink("Users", MVC.User.Index(), accesskey: "3")</li>
|
||||
@if (Authorization.HasAny(Claims.User.Search))
|
||||
{
|
||||
<li class="@((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null)">@Html.ActionLink("Users", MVC.User.Index(), accesskey: "3")</li>
|
||||
}
|
||||
<li class="moveRight@((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null)">@Html.ActionLink("Reports", MVC.Public.Public.Index())</li>
|
||||
@if (Authorization.Has(Claims.Config.Show))
|
||||
@@ -116,9 +118,11 @@
|
||||
{ @Html.ActionLink(CurrentUser.ToString(), MVC.User.Show(CurrentUser.Id))}
|
||||
else
|
||||
{@CurrentUser.ToString()}</span>
|
||||
@if (Authorization.HasAny(Claims.Job.Search, Claims.Device.Search, Claims.User.Search)){
|
||||
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{ @Html.TextBox("term", null, new { id="SearchQuery", accesskey = "s", placeholder="Search" }) }}
|
||||
@if (Authorization.HasAny(Claims.Job.Search, Claims.Device.Search, Claims.User.Search))
|
||||
{
|
||||
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{ @Html.TextBox("term", null, new { id = "SearchQuery", accesskey = "s", placeholder = "Search", data_quicksearchurl = Url.Action(MVC.API.Search.QuickQuery()) }) }
|
||||
}
|
||||
</div>
|
||||
</header>
|
||||
<div id="layout_PageHeading">@CommonHelpers.Breadcrumbs(ViewBag.Title ?? string.Empty)</div>
|
||||
|
||||
@@ -183,7 +183,7 @@ WriteLiteral("\r\n <ul>\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteLiteral(" class=\"d-sm\"");
|
||||
|
||||
@@ -191,62 +191,62 @@ WriteLiteral("><i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-caret-right\"");
|
||||
|
||||
WriteLiteral("></i><a>Queues</a>\r\n <ul>\r\n");
|
||||
WriteLiteral("></i><a>Queues</a>\r\n <ul>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\Shared\_Layout.cshtml"
|
||||
foreach (var queueToken in queues)
|
||||
{
|
||||
foreach (var queueToken in queues)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li><a");
|
||||
WriteLiteral(" <li><a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1672), Tuple.Create("\"", 1729)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1652), Tuple.Create("\"", 1709)
|
||||
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1679), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Queue(queueToken.JobQueue.Id))
|
||||
, Tuple.Create(Tuple.Create("", 1659), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Job.Queue(queueToken.JobQueue.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1679), false)
|
||||
, 1659), false)
|
||||
);
|
||||
|
||||
WriteLiteral("><i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1733), Tuple.Create("\"", 1816)
|
||||
, Tuple.Create(Tuple.Create("", 1741), Tuple.Create("fa", 1741), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1743), Tuple.Create("fa-", 1744), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1713), Tuple.Create("\"", 1796)
|
||||
, Tuple.Create(Tuple.Create("", 1721), Tuple.Create("fa", 1721), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1723), Tuple.Create("fa-", 1724), true)
|
||||
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1747), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.Icon
|
||||
, Tuple.Create(Tuple.Create("", 1727), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1747), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1774), Tuple.Create("fa-fw", 1775), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1780), Tuple.Create("d-", 1781), true)
|
||||
, 1727), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1754), Tuple.Create("fa-fw", 1755), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1760), Tuple.Create("d-", 1761), true)
|
||||
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1783), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.IconColour
|
||||
, Tuple.Create(Tuple.Create("", 1763), Tuple.Create<System.Object, System.Int32>(queueToken.JobQueue.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1783), false)
|
||||
, 1763), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i> ");
|
||||
WriteLiteral("></i>");
|
||||
|
||||
|
||||
#line 35 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(queueToken.JobQueue.Name);
|
||||
Write(queueToken.JobQueue.Name);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -255,13 +255,13 @@ WriteLiteral("</a></li>\r\n");
|
||||
|
||||
|
||||
#line 36 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </ul>\r\n " +
|
||||
" </li>\r\n");
|
||||
WriteLiteral(" </ul>\r\n </li>\r" +
|
||||
"\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\Shared\_Layout.cshtml"
|
||||
@@ -655,28 +655,29 @@ WriteLiteral(" </ul>\r\n </li>\r\n");
|
||||
#line hidden
|
||||
|
||||
#line 101 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.HasAny(Claims.Device.Search, Claims.Device.Actions.Import, Claims.Device.Actions.Export, Claims.Device.Actions.EnrolDevices)){
|
||||
if (Authorization.HasAny(Claims.Device.Search, Claims.Device.Actions.Import, Claims.Device.Actions.Export, Claims.Device.Actions.EnrolDevices))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6398), Tuple.Create("\"", 6486)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6391), Tuple.Create("\"", 6479)
|
||||
|
||||
#line 102 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6406), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
|
||||
#line 103 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6399), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Device.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6406), false)
|
||||
, 6399), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 102 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2"));
|
||||
#line 103 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Devices", MVC.Device.Index(), accesskey: "2"));
|
||||
|
||||
|
||||
#line default
|
||||
@@ -684,7 +685,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 103 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 104 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -693,29 +694,30 @@ WriteLiteral("</li>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 104 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.HasAny(Claims.User.Search)){
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6673), Tuple.Create("\"", 6759)
|
||||
|
||||
#line 105 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6681), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
|
||||
if (Authorization.HasAny(Claims.User.Search))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6681), false)
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6692), Tuple.Create("\"", 6778)
|
||||
|
||||
#line 107 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6700), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.User.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6700), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 105 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Users", MVC.User.Index(), accesskey: "3"));
|
||||
#line 107 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Users", MVC.User.Index(), accesskey: "3"));
|
||||
|
||||
|
||||
#line default
|
||||
@@ -723,7 +725,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 106 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 108 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -731,21 +733,21 @@ WriteLiteral("</li>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6873), Tuple.Create("\"", 6971)
|
||||
, Tuple.Create(Tuple.Create("", 6881), Tuple.Create("moveRight", 6881), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 6892), Tuple.Create("\"", 6990)
|
||||
, Tuple.Create(Tuple.Create("", 6900), Tuple.Create("moveRight", 6900), true)
|
||||
|
||||
#line 107 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6890), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
|
||||
#line 109 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 6909), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Public.Name ? " active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 6890), false)
|
||||
, 6909), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 107 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 109 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Reports", MVC.Public.Public.Index()));
|
||||
|
||||
|
||||
@@ -754,13 +756,13 @@ WriteLiteral(">");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 108 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 110 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 108 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 110 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.Config.Show))
|
||||
{
|
||||
|
||||
@@ -769,20 +771,20 @@ WriteLiteral("</li>\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <li");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7149), Tuple.Create("\"", 7237)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 7168), Tuple.Create("\"", 7256)
|
||||
|
||||
#line 110 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7157), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
|
||||
#line 112 "..\..\Views\Shared\_Layout.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 7176), Tuple.Create<System.Object, System.Int32>((string)ViewContext.ViewData["MenuArea"] == MVC.Config.Name ? "active" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 7157), false)
|
||||
, 7176), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 110 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 112 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Configuration", MVC.Config.Config.Index(), accesskey: "0"));
|
||||
|
||||
|
||||
@@ -791,7 +793,7 @@ WriteLiteral(">");
|
||||
WriteLiteral("</li>\r\n");
|
||||
|
||||
|
||||
#line 111 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 113 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -804,21 +806,21 @@ WriteLiteral(" id=\"headerMenu\"");
|
||||
WriteLiteral(">\r\n <span>");
|
||||
|
||||
|
||||
#line 115 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 117 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.Has(Claims.User.Show))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 116 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 118 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink(CurrentUser.ToString(), MVC.User.Show(CurrentUser.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 116 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 118 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -826,14 +828,14 @@ WriteLiteral(">\r\n <span>");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 118 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 120 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(CurrentUser.ToString());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 118 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 120 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
@@ -841,29 +843,31 @@ WriteLiteral(">\r\n <span>");
|
||||
WriteLiteral("</span>\r\n");
|
||||
|
||||
|
||||
#line 119 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 121 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 119 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.HasAny(Claims.Job.Search, Claims.Device.Search, Claims.User.Search)){
|
||||
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{
|
||||
#line 121 "..\..\Views\Shared\_Layout.cshtml"
|
||||
if (Authorization.HasAny(Claims.Job.Search, Claims.Device.Search, Claims.User.Search))
|
||||
{
|
||||
using (Html.BeginForm(MVC.Search.Query(), FormMethod.Get))
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 121 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.TextBox("term", null, new { id="SearchQuery", accesskey = "s", placeholder="Search" }));
|
||||
#line 124 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.TextBox("term", null, new { id = "SearchQuery", accesskey = "s", placeholder = "Search", data_quicksearchurl = Url.Action(MVC.API.Search.QuickQuery()) }));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 121 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}}
|
||||
#line 124 "..\..\Views\Shared\_Layout.cshtml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -875,7 +879,7 @@ WriteLiteral(" id=\"layout_PageHeading\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 124 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 128 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(CommonHelpers.Breadcrumbs(ViewBag.Title ?? string.Empty));
|
||||
|
||||
|
||||
@@ -890,7 +894,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 126 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 130 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(RenderBody());
|
||||
|
||||
|
||||
@@ -899,7 +903,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </section>\r\n <footer>\r\n Disco v");
|
||||
|
||||
|
||||
#line 129 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 133 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.Version);
|
||||
|
||||
|
||||
@@ -910,7 +914,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("@ ");
|
||||
|
||||
|
||||
#line 129 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 133 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Disco.Web.DiscoApplication.OrganisationName);
|
||||
|
||||
|
||||
@@ -920,7 +924,7 @@ WriteLiteral(" | <a\r\n href=\"https://discoict.com.au/\" target=
|
||||
"om.au</a> | ");
|
||||
|
||||
|
||||
#line 130 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 134 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Credits", MVC.Public.Public.Credits()));
|
||||
|
||||
|
||||
@@ -929,7 +933,7 @@ WriteLiteral(" | <a\r\n href=\"https://discoict.com.au/\" target=
|
||||
WriteLiteral(" | ");
|
||||
|
||||
|
||||
#line 130 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 134 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Write(Html.ActionLink("Licence", MVC.Public.Public.Licence()));
|
||||
|
||||
|
||||
@@ -938,13 +942,13 @@ WriteLiteral(" | ");
|
||||
WriteLiteral("\r\n </footer>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 133 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 137 "..\..\Views\Shared\_Layout.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 133 "..\..\Views\Shared\_Layout.cshtml"
|
||||
#line 137 "..\..\Views\Shared\_Layout.cshtml"
|
||||
Disco.Services.Plugins.Features.UIExtension.UIExtensions.ExecuteExtensionResult(this);
|
||||
|
||||
#line default
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@model IEnumerable<Disco.Models.BI.Search.UserSearchResultItem>
|
||||
@model IEnumerable<Disco.Models.Services.Searching.UserSearchResultItem>
|
||||
<div class="genericData userTable">
|
||||
@if (Model != null && Model.Count() > 0)
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Disco.Web.Views.User
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Web;
|
||||
using Disco.Web;
|
||||
@@ -36,7 +37,7 @@ namespace Disco.Web.Views.User
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/User/_UserTable.cshtml")]
|
||||
public partial class UserTable : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Models.BI.Search.UserSearchResultItem>>
|
||||
public partial class UserTable : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Models.Services.Searching.UserSearchResultItem>>
|
||||
{
|
||||
public UserTable()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user