#138 display device flags where appropriate in the UI
This commit is contained in:
@@ -6,44 +6,51 @@
|
||||
ViewBag.Title = Html.ToBreadcrumb("Users", MVC.User.Index(), string.Format("User: {0} ({1})", Model.User.DisplayName, Model.User.FriendlyId()));
|
||||
}
|
||||
<div id="User_Show">
|
||||
<div id="User_Show_Flags">
|
||||
@foreach (var flag in Model.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 fa-lg 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.AddedUser)</span></span></i>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#User_Show_Flags')
|
||||
.appendTo('#layout_PageHeading')
|
||||
.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'User_FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: "right top",
|
||||
at: "right bottom",
|
||||
collision: "flipfit flip"
|
||||
},
|
||||
hade: {
|
||||
effect: ''
|
||||
},
|
||||
close: function (e, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$(this).stop(true).fadeTo(100, 1);
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
{
|
||||
<div id="User_Show_Flags">
|
||||
@foreach (var flag in Model.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 fa-lg 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.AddedUser)</span>
|
||||
</span>
|
||||
</i>
|
||||
}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#User_Show_Flags')
|
||||
.appendTo('#layout_PageHeading')
|
||||
.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: "right top",
|
||||
at: "right bottom",
|
||||
collision: "flipfit flip"
|
||||
},
|
||||
hade: {
|
||||
effect: ''
|
||||
},
|
||||
close: function (e, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$(this).stop(true).fadeTo(100, 1);
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@Html.Partial(MVC.User.Views.UserParts._Subject, Model)
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
@@ -63,64 +63,80 @@ WriteLiteral("\r\n<div");
|
||||
|
||||
WriteLiteral(" id=\"User_Show\"");
|
||||
|
||||
WriteLiteral(">\r\n <div");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 9 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 9 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" id=\"User_Show_Flags\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 10 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
#line 12 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 10 "..\..\Views\User\Show.cshtml"
|
||||
foreach (var flag in Model.User.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
#line 12 "..\..\Views\User\Show.cshtml"
|
||||
foreach (var flag in Model.User.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 535), Tuple.Create("\"", 611)
|
||||
, Tuple.Create(Tuple.Create("", 543), Tuple.Create("flag", 543), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 547), Tuple.Create("fa", 548), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 550), Tuple.Create("fa-", 551), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 620), Tuple.Create("\"", 696)
|
||||
, Tuple.Create(Tuple.Create("", 628), Tuple.Create("flag", 628), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 632), Tuple.Create("fa", 633), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 635), Tuple.Create("fa-", 636), true)
|
||||
|
||||
#line 12 "..\..\Views\User\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 554), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
||||
#line 14 "..\..\Views\User\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 639), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 554), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 572), Tuple.Create("fa-fw", 573), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 578), Tuple.Create("fa-lg", 579), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 584), Tuple.Create("d-", 585), true)
|
||||
, 639), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 657), Tuple.Create("fa-fw", 658), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 663), Tuple.Create("fa-lg", 664), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 669), Tuple.Create("d-", 670), true)
|
||||
|
||||
#line 12 "..\..\Views\User\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 587), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
||||
#line 14 "..\..\Views\User\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 672), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 587), false)
|
||||
, 672), false)
|
||||
);
|
||||
|
||||
WriteLiteral("><span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"details\"");
|
||||
|
||||
WriteLiteral("><span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\User\Show.cshtml"
|
||||
Write(flag.Item2.Name);
|
||||
#line 16 "..\..\Views\User\Show.cshtml"
|
||||
Write(flag.Item2.Name);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -128,9 +144,9 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 12 "..\..\Views\User\Show.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
#line 16 "..\..\Views\User\Show.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -141,8 +157,8 @@ WriteLiteral(" class=\"comments\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\User\Show.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
#line 17 "..\..\Views\User\Show.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
@@ -150,8 +166,8 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\User\Show.cshtml"
|
||||
}
|
||||
#line 17 "..\..\Views\User\Show.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -162,62 +178,71 @@ WriteLiteral(" class=\"added\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 13 "..\..\Views\User\Show.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUser));
|
||||
#line 17 "..\..\Views\User\Show.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUser));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span></span></i>\r\n");
|
||||
WriteLiteral("</span>\r\n </span>\r\n </i>\r\n");
|
||||
|
||||
|
||||
#line 14 "..\..\Views\User\Show.cshtml"
|
||||
}
|
||||
#line 20 "..\..\Views\User\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>\r\n <script");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
WriteLiteral(" <script");
|
||||
|
||||
WriteLiteral(" type=\"text/javascript\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
$(function () {
|
||||
$('#User_Show_Flags')
|
||||
.appendTo('#layout_PageHeading')
|
||||
.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'User_FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: ""right top"",
|
||||
at: ""right bottom"",
|
||||
collision: ""flipfit flip""
|
||||
},
|
||||
hade: {
|
||||
effect: ''
|
||||
},
|
||||
close: function (e, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$(this).stop(true).fadeTo(100, 1);
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
$(function () {
|
||||
$('#User_Show_Flags')
|
||||
.appendTo('#layout_PageHeading')
|
||||
.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: ""right top"",
|
||||
at: ""right bottom"",
|
||||
collision: ""flipfit flip""
|
||||
},
|
||||
hade: {
|
||||
effect: ''
|
||||
},
|
||||
close: function (e, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$(this).stop(true).fadeTo(100, 1);
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 53 "..\..\Views\User\Show.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 47 "..\..\Views\User\Show.cshtml"
|
||||
#line 54 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Subject, Model));
|
||||
|
||||
|
||||
@@ -257,13 +282,13 @@ WriteLiteral(" id=\"UserDetailTabItems\"");
|
||||
WriteLiteral("></ul>\r\n");
|
||||
|
||||
|
||||
#line 83 "..\..\Views\User\Show.cshtml"
|
||||
#line 90 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 83 "..\..\Views\User\Show.cshtml"
|
||||
#line 90 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowJobs))
|
||||
{
|
||||
|
||||
@@ -271,14 +296,14 @@ WriteLiteral("></ul>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 85 "..\..\Views\User\Show.cshtml"
|
||||
#line 92 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Jobs, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 85 "..\..\Views\User\Show.cshtml"
|
||||
#line 92 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -288,7 +313,7 @@ WriteLiteral("></ul>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 87 "..\..\Views\User\Show.cshtml"
|
||||
#line 94 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAssignmentHistory))
|
||||
{
|
||||
|
||||
@@ -296,14 +321,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 89 "..\..\Views\User\Show.cshtml"
|
||||
#line 96 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._AssignmentHistory, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 89 "..\..\Views\User\Show.cshtml"
|
||||
#line 96 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -313,7 +338,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 91 "..\..\Views\User\Show.cshtml"
|
||||
#line 98 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAttachments))
|
||||
{
|
||||
|
||||
@@ -321,14 +346,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 93 "..\..\Views\User\Show.cshtml"
|
||||
#line 100 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Resources, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 93 "..\..\Views\User\Show.cshtml"
|
||||
#line 100 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -338,7 +363,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 95 "..\..\Views\User\Show.cshtml"
|
||||
#line 102 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
{
|
||||
|
||||
@@ -346,14 +371,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 97 "..\..\Views\User\Show.cshtml"
|
||||
#line 104 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Flags, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 97 "..\..\Views\User\Show.cshtml"
|
||||
#line 104 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -363,7 +388,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 99 "..\..\Views\User\Show.cshtml"
|
||||
#line 106 "..\..\Views\User\Show.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowAuthorization))
|
||||
{
|
||||
|
||||
@@ -371,14 +396,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 101 "..\..\Views\User\Show.cshtml"
|
||||
#line 108 "..\..\Views\User\Show.cshtml"
|
||||
Write(Html.Partial(MVC.User.Views.UserParts._Authorization, Model));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 101 "..\..\Views\User\Show.cshtml"
|
||||
#line 108 "..\..\Views\User\Show.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@model Disco.Web.Models.User.ShowModel
|
||||
@using Disco.Services.Devices.DeviceFlags;
|
||||
@{
|
||||
Authorization.Require(Claims.User.Show);
|
||||
|
||||
@@ -418,6 +419,55 @@
|
||||
<span class="User_Show_AssignedDevices_CurrentAssignment_Assigned">@CommonHelpers.FriendlyDate(assignment.AssignedDate)</span>
|
||||
</td>
|
||||
</tr>
|
||||
@if (Authorization.Has(Claims.Device.ShowFlagAssignments) &&
|
||||
assignment.Device.DeviceFlagAssignments.Any(a => a.RemovedDate.HasValue))
|
||||
{
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="User_Show_Assigned_Devices_CurrentAssignment_Flags">
|
||||
@foreach (var flag in assignment.Device.DeviceFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, DeviceFlagService.GetDeviceFlag(f.DeviceFlagId))))
|
||||
{
|
||||
<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 () {
|
||||
$('.User_Show_Assigned_Devices_CurrentAssignment_Flags')
|
||||
.tooltip({
|
||||
items: 'i.flag',
|
||||
content: function () {
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: "right top",
|
||||
at: "right bottom",
|
||||
collision: "flipfit flip"
|
||||
},
|
||||
hade: {
|
||||
effect: ''
|
||||
},
|
||||
close: function (e, ui) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$(this).stop(true).fadeTo(100, 1);
|
||||
},
|
||||
function () {
|
||||
$(this).fadeOut(100, function () { $(this).remove(); });
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,21 +5,27 @@
|
||||
}
|
||||
<div class="genericData userTable">
|
||||
@if (Model != null && Model.Count() > 0)
|
||||
{
|
||||
{
|
||||
<table class="genericData userTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th>Surname
|
||||
<th>
|
||||
Surname
|
||||
</th>
|
||||
<th>Given Name
|
||||
<th>
|
||||
Given Name
|
||||
</th>
|
||||
<th>Display Name
|
||||
<th>
|
||||
Display Name
|
||||
</th>
|
||||
<th>Assigned Devices
|
||||
<th>
|
||||
Assigned Devices
|
||||
</th>
|
||||
<th>Jobs
|
||||
<th>
|
||||
Jobs
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -36,14 +42,23 @@
|
||||
{
|
||||
@item.FriendlyId
|
||||
}
|
||||
@if (item.UserFlagAssignments != null && item.UserFlagAssignments.Count > 0)
|
||||
{<div class="flags">
|
||||
@foreach (var flag in item.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
@if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
{
|
||||
@if (item.UserFlagAssignments != null && item.UserFlagAssignments.Count > 0)
|
||||
{
|
||||
<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>
|
||||
<div class="flags">
|
||||
@foreach (var flag in item.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>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>}
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@item.Surname
|
||||
@@ -59,9 +74,9 @@
|
||||
</td>
|
||||
<td>
|
||||
@item.JobCountOpen @if (item.JobCount > item.JobCountOpen)
|
||||
{
|
||||
{
|
||||
<span class="smallMessage">(@(item.JobCount - item.JobCountOpen) Closed)</span>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@@ -81,7 +96,7 @@
|
||||
var $this = $(this);
|
||||
return $this.children('.details').html();
|
||||
},
|
||||
tooltipClass: 'User_FlagAssignment_Tooltip',
|
||||
tooltipClass: 'FlagAssignment_Tooltip',
|
||||
position: {
|
||||
my: "right top",
|
||||
at: "right bottom",
|
||||
@@ -108,7 +123,7 @@
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
<span class="smallMessage">No Users Found</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -72,7 +72,7 @@ WriteLiteral(">\r\n");
|
||||
|
||||
#line 7 "..\..\Views\User\_UserTable.cshtml"
|
||||
if (Model != null && Model.Count() > 0)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -84,17 +84,23 @@ WriteLiteral(" class=\"genericData userTable\"");
|
||||
WriteLiteral(@">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id
|
||||
<th>
|
||||
Id
|
||||
</th>
|
||||
<th>Surname
|
||||
<th>
|
||||
Surname
|
||||
</th>
|
||||
<th>Given Name
|
||||
<th>
|
||||
Given Name
|
||||
</th>
|
||||
<th>Display Name
|
||||
<th>
|
||||
Display Name
|
||||
</th>
|
||||
<th>Assigned Devices
|
||||
<th>
|
||||
Assigned Devices
|
||||
</th>
|
||||
<th>Jobs
|
||||
<th>
|
||||
Jobs
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -102,13 +108,13 @@ WriteLiteral(@">
|
||||
");
|
||||
|
||||
|
||||
#line 27 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 33 "..\..\Views\User\_UserTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 27 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 33 "..\..\Views\User\_UserTable.cshtml"
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
@@ -118,13 +124,13 @@ WriteLiteral(@">
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
|
||||
|
||||
#line 31 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 37 "..\..\Views\User\_UserTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 31 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 37 "..\..\Views\User\_UserTable.cshtml"
|
||||
if (Authorization.Has(Claims.User.Show))
|
||||
{
|
||||
|
||||
@@ -132,14 +138,14 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 39 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(Html.ActionLink(item.FriendlyId, MVC.User.Show(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 33 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 39 "..\..\Views\User\_UserTable.cshtml"
|
||||
|
||||
}
|
||||
else
|
||||
@@ -149,14 +155,14 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 37 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 43 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(item.FriendlyId);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 37 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 43 "..\..\Views\User\_UserTable.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -166,69 +172,78 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 39 "..\..\Views\User\_UserTable.cshtml"
|
||||
if (item.UserFlagAssignments != null && item.UserFlagAssignments.Count > 0)
|
||||
#line 45 "..\..\Views\User\_UserTable.cshtml"
|
||||
if (Authorization.Has(Claims.User.ShowFlagAssignments))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("<div");
|
||||
|
||||
#line 47 "..\..\Views\User\_UserTable.cshtml"
|
||||
if (item.UserFlagAssignments != null && item.UserFlagAssignments.Count > 0)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteLiteral(" class=\"flags\"");
|
||||
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 41 "..\..\Views\User\_UserTable.cshtml"
|
||||
|
||||
#line 50 "..\..\Views\User\_UserTable.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 41 "..\..\Views\User\_UserTable.cshtml"
|
||||
foreach (var flag in item.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
#line 50 "..\..\Views\User\_UserTable.cshtml"
|
||||
foreach (var flag in item.UserFlagAssignments.Where(f => !f.RemovedDate.HasValue).Select(f => Tuple.Create(f, UserFlagService.GetUserFlag(f.UserFlagId))))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1722), Tuple.Create("\"", 1792)
|
||||
, Tuple.Create(Tuple.Create("", 1730), Tuple.Create("flag", 1730), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1734), Tuple.Create("fa", 1735), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1737), Tuple.Create("fa-", 1738), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2064), Tuple.Create("\"", 2134)
|
||||
, Tuple.Create(Tuple.Create("", 2072), Tuple.Create("flag", 2072), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2076), Tuple.Create("fa", 2077), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2079), Tuple.Create("fa-", 2080), true)
|
||||
|
||||
#line 43 "..\..\Views\User\_UserTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1741), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
||||
#line 52 "..\..\Views\User\_UserTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2083), Tuple.Create<System.Object, System.Int32>(flag.Item2.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1741), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1759), Tuple.Create("fa-fw", 1760), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1765), Tuple.Create("d-", 1766), true)
|
||||
, 2083), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 2101), Tuple.Create("fa-fw", 2102), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 2107), Tuple.Create("d-", 2108), true)
|
||||
|
||||
#line 43 "..\..\Views\User\_UserTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1768), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
||||
#line 52 "..\..\Views\User\_UserTable.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2110), Tuple.Create<System.Object, System.Int32>(flag.Item2.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1768), false)
|
||||
, 2110), false)
|
||||
);
|
||||
|
||||
WriteLiteral("><span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"details\"");
|
||||
|
||||
WriteLiteral("><span");
|
||||
WriteLiteral(">\r\n <span");
|
||||
|
||||
WriteLiteral(" class=\"name\"");
|
||||
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(flag.Item2.Name);
|
||||
#line 54 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(flag.Item2.Name);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -236,9 +251,9 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 43 "..\..\Views\User\_UserTable.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
#line 54 "..\..\Views\User\_UserTable.cshtml"
|
||||
if (flag.Item1.Comments != null)
|
||||
{
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -249,8 +264,8 @@ WriteLiteral(" class=\"comments\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
#line 55 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(flag.Item1.Comments.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
@@ -258,8 +273,8 @@ WriteLiteral(">");
|
||||
WriteLiteral("</span>");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
#line 55 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
@@ -270,26 +285,33 @@ WriteLiteral(" class=\"added\"");
|
||||
WriteLiteral(">");
|
||||
|
||||
|
||||
#line 44 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId));
|
||||
#line 55 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(CommonHelpers.FriendlyDateAndUser(flag.Item1.AddedDate, flag.Item1.AddedUserId));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</span></span></i>\r\n");
|
||||
WriteLiteral("</span>\r\n </span>\r\n " +
|
||||
" </i>\r\n");
|
||||
|
||||
|
||||
#line 45 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 58 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 60 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </div>");
|
||||
|
||||
|
||||
#line 46 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
#line 60 "..\..\Views\User\_UserTable.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -299,7 +321,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 49 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 64 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(item.Surname);
|
||||
|
||||
|
||||
@@ -310,7 +332,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 52 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 67 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(item.GivenName);
|
||||
|
||||
|
||||
@@ -321,7 +343,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 55 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 70 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(item.DisplayName);
|
||||
|
||||
|
||||
@@ -332,7 +354,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 58 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 73 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(item.AssignedDevicesCount);
|
||||
|
||||
|
||||
@@ -343,7 +365,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 76 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(item.JobCountOpen);
|
||||
|
||||
|
||||
@@ -352,9 +374,9 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 61 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 76 "..\..\Views\User\_UserTable.cshtml"
|
||||
if (item.JobCount > item.JobCountOpen)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -366,7 +388,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">(");
|
||||
|
||||
|
||||
#line 63 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 78 "..\..\Views\User\_UserTable.cshtml"
|
||||
Write(item.JobCount - item.JobCountOpen);
|
||||
|
||||
|
||||
@@ -375,8 +397,8 @@ WriteLiteral(">(");
|
||||
WriteLiteral(" Closed)</span>\r\n");
|
||||
|
||||
|
||||
#line 64 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
#line 79 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
@@ -384,7 +406,7 @@ WriteLiteral(" Closed)</span>\r\n");
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
|
||||
|
||||
#line 67 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 82 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -403,26 +425,26 @@ WriteLiteral(">\r\n $(function () {\r\n var userTable
|
||||
"\',\r\n content: function () {\r\n " +
|
||||
" var $this = $(this);\r\n return $this.child" +
|
||||
"ren(\'.details\').html();\r\n },\r\n " +
|
||||
" tooltipClass: \'User_FlagAssignment_Tooltip\',\r\n p" +
|
||||
"osition: {\r\n my: \"right top\",\r\n " +
|
||||
" at: \"right bottom\",\r\n collision: \"f" +
|
||||
"lipfit flip\"\r\n },\r\n hade: " +
|
||||
"{\r\n effect: \'\'\r\n },\r\n " +
|
||||
" close: function (e, ui) {\r\n " +
|
||||
" ui.tooltip.hover(\r\n function () {\r\n " +
|
||||
" $(this).stop(true).fadeTo(100, 1);\r\n " +
|
||||
" },\r\n function () " +
|
||||
"{\r\n $(this).fadeOut(100, function () { $(" +
|
||||
"this).remove(); });\r\n });\r\n " +
|
||||
" }\r\n });\r\n\r\n $this.data(\'" +
|
||||
"userTable_Flags\', true)\r\n }\r\n });\r\n " +
|
||||
" });\r\n </script>\r\n");
|
||||
" tooltipClass: \'FlagAssignment_Tooltip\',\r\n positi" +
|
||||
"on: {\r\n my: \"right top\",\r\n " +
|
||||
" at: \"right bottom\",\r\n collision: \"flipfi" +
|
||||
"t flip\"\r\n },\r\n hade: {\r\n " +
|
||||
" effect: \'\'\r\n },\r\n " +
|
||||
" close: function (e, ui) {\r\n " +
|
||||
" ui.tooltip.hover(\r\n function () {\r\n " +
|
||||
" $(this).stop(true).fadeTo(100, 1);\r\n " +
|
||||
" },\r\n function () {\r\n " +
|
||||
" $(this).fadeOut(100, function () { $(this)" +
|
||||
".remove(); });\r\n });\r\n " +
|
||||
" }\r\n });\r\n\r\n $this.data(\'userT" +
|
||||
"able_Flags\', true)\r\n }\r\n });\r\n });\r" +
|
||||
"\n </script>\r\n");
|
||||
|
||||
|
||||
#line 109 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 124 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -434,7 +456,7 @@ WriteLiteral(" class=\"smallMessage\"");
|
||||
WriteLiteral(">No Users Found</span>\r\n");
|
||||
|
||||
|
||||
#line 113 "..\..\Views\User\_UserTable.cshtml"
|
||||
#line 128 "..\..\Views\User\_UserTable.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user