Hide Document Templates & UI Tweaks
Flag Document Templates as hidden. UI changes aim to improve visibility of used features in lists.
This commit is contained in:
@@ -20,7 +20,18 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
var m = new Models.DocumentTemplate.IndexModel() { DocumentTemplates = Database.DocumentTemplates.ToList() };
|
||||
var m = new Models.DocumentTemplate.IndexModel() {
|
||||
DocumentTemplates = Database.DocumentTemplates
|
||||
.Select(dt => new
|
||||
{
|
||||
documentTemplate = dt,
|
||||
storedInstances =
|
||||
Database.DeviceAttachments.Count(a => a.DocumentTemplateId == dt.Id) +
|
||||
Database.JobAttachments.Count(a => a.DocumentTemplateId == dt.Id) +
|
||||
Database.UserAttachments.Count(a => a.DocumentTemplateId == dt.Id)
|
||||
})
|
||||
.ToDictionary(i => i.documentTemplate, i => i.storedInstances)
|
||||
};
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigDocumentTemplateIndexModel>(this.ControllerContext, m);
|
||||
|
||||
@@ -53,7 +53,15 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
// List Index
|
||||
var m = new Models.UserFlag.IndexModel()
|
||||
{
|
||||
UserFlags = Database.UserFlags.OrderBy(f => f.Name).ToList()
|
||||
UserFlags = Database.UserFlags
|
||||
.Select(uf => new
|
||||
{
|
||||
userFlag = uf,
|
||||
assignmentCount = uf.UserFlagAssignments.Count(fa => !fa.RemovedDate.HasValue)
|
||||
})
|
||||
.ToDictionary(
|
||||
pair => pair.userFlag,
|
||||
pair => pair.assignmentCount)
|
||||
};
|
||||
|
||||
// UI Extensions
|
||||
|
||||
@@ -25,7 +25,8 @@ namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||
DefaultDeviceModel = db.DefaultDeviceModel.Description,
|
||||
WarrantyExpires = db.WarrantyValidUntil,
|
||||
InsuranceSupplier = db.InsuranceSupplier,
|
||||
InsuredUntil = db.InsuredUntil
|
||||
InsuredUntil = db.InsuredUntil,
|
||||
IsLinked = db.AssignedUsersLinkedGroup != null || db.DevicesLinkedGroup != null
|
||||
}).ToArray().Cast<ConfigDeviceBatchIndexModelItem>().ToList();
|
||||
|
||||
foreach (var item in m.DeviceBatches.Where(db => db.DefaultDeviceModel == null))
|
||||
|
||||
@@ -20,5 +20,6 @@ namespace Disco.Web.Areas.Config.Models.DeviceBatch
|
||||
public DateTime? WarrantyExpires { get; set; }
|
||||
public DateTime? InsuredUntil { get; set; }
|
||||
public string InsuranceSupplier { get; set; }
|
||||
public bool IsLinked { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,8 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
Description = dp.Description,
|
||||
DistributionType = dp.DistributionType.Value,
|
||||
DeviceCount = dp.Devices.Count,
|
||||
DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue)
|
||||
DeviceDecommissionedCount = dp.Devices.Count(d => d.DecommissionedDate.HasValue),
|
||||
IsLinked = dp.AssignedUsersLinkedGroup != null || dp.DevicesLinkedGroup != null
|
||||
}).ToArray().Cast<ConfigDeviceProfileIndexModelItem>().ToList();
|
||||
|
||||
if (DiscoApplication.MultiSiteMode)
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Disco.Web.Extensions;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
using Disco.Models.UI.Config.DeviceProfile;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
{
|
||||
@@ -20,5 +14,6 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
|
||||
|
||||
public int DeviceCount { get; set; }
|
||||
public int DeviceDecommissionedCount { get; set; }
|
||||
public bool IsLinked { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,10 @@
|
||||
using Disco.Models.UI.Config.DocumentTemplate;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
|
||||
{
|
||||
public class IndexModel : ConfigDocumentTemplateIndexModel
|
||||
{
|
||||
public List<Disco.Models.Repository.DocumentTemplate> DocumentTemplates { get; set; }
|
||||
public Dictionary<Disco.Models.Repository.DocumentTemplate, int> DocumentTemplates { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,6 @@ namespace Disco.Web.Areas.Config.Models.UserFlag
|
||||
{
|
||||
public class IndexModel : ConfigUserFlagIndexModel
|
||||
{
|
||||
public List<Disco.Models.Repository.UserFlag> UserFlags { get; set; }
|
||||
public Dictionary<Disco.Models.Repository.UserFlag, int> UserFlags { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,17 +2,19 @@
|
||||
@{
|
||||
Authorization.Require(Claims.Config.DeviceBatch.Show);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches");
|
||||
var hasDecommissionedBatches = Model.DeviceBatches.Any(db => db.DeviceCount > 0 && db.DeviceDecommissionedCount >= db.DeviceCount);
|
||||
var showTags = hasDecommissionedBatches || Model.DeviceBatches.Any(i => i.IsLinked);
|
||||
}
|
||||
<div id="Config_DeviceBatches">
|
||||
@if (Model.DeviceBatches.Count == 0)
|
||||
{
|
||||
<div class="form" style="width: 450px; padding: 100px 0;">
|
||||
<h2>No device batches are configured</h2>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model.DeviceBatches.Any(db => db.DeviceCount > 0 && db.DeviceDecommissionedCount >= db.DeviceCount))
|
||||
if (hasDecommissionedBatches)
|
||||
{
|
||||
<a id="Config_DeviceBatches_ShowDecommissioned" href="#" class="button small">Show Decommissioned (@(Model.DeviceBatches.Count(db => db.DeviceCount > 0 && db.DeviceDecommissionedCount >= db.DeviceCount)))</a>
|
||||
<script>
|
||||
@@ -21,7 +23,7 @@
|
||||
|
||||
$('#Config_DeviceBatches_ShowDecommissioned').click(function () {
|
||||
$(this).remove();
|
||||
$('#Config_DeviceBatches_List').find('tr.decommissioned').show();
|
||||
$('#Config_DeviceBatches_List').find('tr.hidden').show();
|
||||
return false;
|
||||
}).detach().appendTo('#layout_PageHeading');
|
||||
})
|
||||
@@ -29,25 +31,23 @@
|
||||
}
|
||||
<table id="Config_DeviceBatches_List" class="tableData">
|
||||
<tr>
|
||||
<th>Name
|
||||
</th>
|
||||
<th>Default Model
|
||||
</th>
|
||||
<th>Purchase Date
|
||||
</th>
|
||||
<th>Warranty Expires
|
||||
</th>
|
||||
<th>Insurance Expires
|
||||
</th>
|
||||
<th>Device Count
|
||||
</th>
|
||||
<th>Name</th>
|
||||
<th>Default Model</th>
|
||||
<th>Purchase Date</th>
|
||||
<th>Warranty Expires</th>
|
||||
<th>Insurance Expires</th>
|
||||
<th>Device Count</th>
|
||||
@if (showTags)
|
||||
{
|
||||
<th> </th>
|
||||
}
|
||||
</tr>
|
||||
@foreach (var item in Model.DeviceBatches)
|
||||
{
|
||||
var isDecommissioned = item.DeviceCount > 0 && item.DeviceDecommissionedCount >= item.DeviceCount;
|
||||
<tr class="@(isDecommissioned ? "decommissioned" : null)">
|
||||
<tr class="@(isDecommissioned ? "hidden" : null)">
|
||||
<td>
|
||||
@Html.ActionLink(item.Name, MVC.Config.DeviceBatch.Index(item.Id)) @if (isDecommissioned) { <em>Decommissioned</em> }
|
||||
@Html.ActionLink(item.Name, MVC.Config.DeviceBatch.Index(item.Id))
|
||||
</td>
|
||||
<td>
|
||||
@item.DefaultDeviceModel
|
||||
@@ -64,18 +64,31 @@
|
||||
</td>
|
||||
<td>
|
||||
@if (item.PurchaseUnitQuantity.HasValue)
|
||||
{
|
||||
{
|
||||
<span>@item.DeviceCount.ToString("n0")/@(item.PurchaseUnitQuantity.Value.ToString("n0"))</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
@item.DeviceCount.ToString("n0")
|
||||
}
|
||||
@if (item.DeviceDecommissionedCount > 0)
|
||||
{
|
||||
{
|
||||
<span class="smallMessage" title="@(item.DeviceDecommissionedCount.ToString("n0")) Decommissioned">(@(item.DeviceDecommissionedCount.ToString("n0")))</span>
|
||||
}
|
||||
</td>
|
||||
@if (showTags)
|
||||
{
|
||||
<td>
|
||||
@if (item.IsLinked)
|
||||
{
|
||||
<i class="fa fa-link fa-lg success" title="Is Linked"></i>
|
||||
}
|
||||
@if (isDecommissioned)
|
||||
{
|
||||
<i class="fa fa-minus-square fa-lg alert" title="Decommissioned"></i>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
@@ -85,7 +98,7 @@
|
||||
{
|
||||
<div class="actionBar">
|
||||
@if (Authorization.Has(Claims.Config.DeviceBatch.ShowTimeline) && Model.DeviceBatches.Count > 0)
|
||||
{
|
||||
{
|
||||
@Html.ActionLinkButton("Timeline", MVC.Config.DeviceBatch.Timeline())
|
||||
}
|
||||
@if (Authorization.HasAll(Claims.Config.DeviceBatch.Create, Claims.Config.DeviceBatch.Configure))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -49,6 +48,8 @@ namespace Disco.Web.Areas.Config.Views.DeviceBatch
|
||||
|
||||
Authorization.Require(Claims.Config.DeviceBatch.Show);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches");
|
||||
var hasDecommissionedBatches = Model.DeviceBatches.Any(db => db.DeviceCount > 0 && db.DeviceDecommissionedCount >= db.DeviceCount);
|
||||
var showTags = hasDecommissionedBatches || Model.DeviceBatches.Any(i => i.IsLinked);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -60,13 +61,13 @@ WriteLiteral(" id=\"Config_DeviceBatches\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (Model.DeviceBatches.Count == 0)
|
||||
{
|
||||
|
||||
@@ -79,14 +80,14 @@ WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px; padding: 100px 0;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>No device batches are configured</h2>\r\n </div> \r\n");
|
||||
WriteLiteral(">\r\n <h2>No device batches are configured</h2>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 12 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 14 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model.DeviceBatches.Any(db => db.DeviceCount > 0 && db.DeviceDecommissionedCount >= db.DeviceCount))
|
||||
if (hasDecommissionedBatches)
|
||||
{
|
||||
|
||||
|
||||
@@ -103,7 +104,7 @@ WriteLiteral(" class=\"button small\"");
|
||||
WriteLiteral(">Show Decommissioned (");
|
||||
|
||||
|
||||
#line 17 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 19 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(Model.DeviceBatches.Count(db => db.DeviceCount > 0 && db.DeviceDecommissionedCount >= db.DeviceCount));
|
||||
|
||||
|
||||
@@ -117,7 +118,7 @@ WriteLiteral(@" <script>
|
||||
|
||||
$('#Config_DeviceBatches_ShowDecommissioned').click(function () {
|
||||
$(this).remove();
|
||||
$('#Config_DeviceBatches_List').find('tr.decommissioned').show();
|
||||
$('#Config_DeviceBatches_List').find('tr.hidden').show();
|
||||
return false;
|
||||
}).detach().appendTo('#layout_PageHeading');
|
||||
})
|
||||
@@ -125,7 +126,7 @@ WriteLiteral(@" <script>
|
||||
");
|
||||
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 31 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -139,22 +140,40 @@ WriteLiteral(" class=\"tableData\"");
|
||||
|
||||
WriteLiteral(@">
|
||||
<tr>
|
||||
<th>Name
|
||||
</th>
|
||||
<th>Default Model
|
||||
</th>
|
||||
<th>Purchase Date
|
||||
</th>
|
||||
<th>Warranty Expires
|
||||
</th>
|
||||
<th>Insurance Expires
|
||||
</th>
|
||||
<th>Device Count
|
||||
</th>
|
||||
</tr>
|
||||
<th>Name</th>
|
||||
<th>Default Model</th>
|
||||
<th>Purchase Date</th>
|
||||
<th>Warranty Expires</th>
|
||||
<th>Insurance Expires</th>
|
||||
<th>Device Count</th>
|
||||
");
|
||||
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 40 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (showTags)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th> </th>\r\n");
|
||||
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 45 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
@@ -171,14 +190,14 @@ WriteLiteral(@">
|
||||
#line hidden
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2028), Tuple.Create("\"", 2081)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 2169), Tuple.Create("\"", 2214)
|
||||
|
||||
#line 48 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 2036), Tuple.Create<System.Object, System.Int32>(isDecommissioned ? "decommissioned" : null
|
||||
, Tuple.Create(Tuple.Create("", 2177), Tuple.Create<System.Object, System.Int32>(isDecommissioned ? "hidden" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 2036), false)
|
||||
, 2177), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <td>\r\n");
|
||||
@@ -192,24 +211,7 @@ WriteLiteral(" ");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (isDecommissioned) {
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <em>Decommissioned</em> ");
|
||||
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
@@ -275,7 +277,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (item.PurchaseUnitQuantity.HasValue)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -304,7 +306,7 @@ WriteLiteral("</span>\r\n");
|
||||
#line 69 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -329,7 +331,7 @@ WriteLiteral(" ");
|
||||
|
||||
#line 74 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (item.DeviceDecommissionedCount > 0)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -338,15 +340,15 @@ WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3515), Tuple.Create("\"", 3586)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 3594), Tuple.Create("\"", 3665)
|
||||
|
||||
#line 76 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 3523), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount.ToString("n0")
|
||||
, Tuple.Create(Tuple.Create("", 3602), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount.ToString("n0")
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 3523), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 3571), Tuple.Create("Decommissioned", 3572), true)
|
||||
, 3602), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 3650), Tuple.Create("Decommissioned", 3651), true)
|
||||
);
|
||||
|
||||
WriteLiteral(">(");
|
||||
@@ -367,10 +369,91 @@ WriteLiteral(")</span>\r\n");
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 80 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 79 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 79 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (showTags)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 82 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (item.IsLinked)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-link fa-lg success\"");
|
||||
|
||||
WriteLiteral(" title=\"Is Linked\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 85 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 86 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (isDecommissioned)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-minus-square fa-lg alert\"");
|
||||
|
||||
WriteLiteral(" title=\"Decommissioned\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 89 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 91 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 93 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -379,7 +462,7 @@ WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 82 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 95 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -388,7 +471,7 @@ WriteLiteral(" </table>\r\n");
|
||||
WriteLiteral("</div>\r\n");
|
||||
|
||||
|
||||
#line 84 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 97 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (Authorization.HasAny(Claims.Config.DeviceBatch.Create, Claims.Config.DeviceBatch.ShowTimeline))
|
||||
{
|
||||
|
||||
@@ -402,28 +485,28 @@ WriteLiteral(" class=\"actionBar\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 87 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 100 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 87 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 100 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.DeviceBatch.ShowTimeline) && Model.DeviceBatches.Count > 0)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 89 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 102 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Timeline", MVC.Config.DeviceBatch.Timeline()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 89 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 102 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -433,7 +516,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 91 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 104 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
if (Authorization.HasAll(Claims.Config.DeviceBatch.Create, Claims.Config.DeviceBatch.Configure))
|
||||
{
|
||||
|
||||
@@ -441,14 +524,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 93 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 106 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Device Batch", MVC.Config.DeviceBatch.Create()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 93 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 106 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -458,7 +541,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" </div>\r\n");
|
||||
|
||||
|
||||
#line 96 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
#line 109 "..\..\Areas\Config\Views\DeviceBatch\Index.cshtml"
|
||||
}
|
||||
|
||||
#line default
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@model IEnumerable<Disco.Web.Areas.Config.Models.DeviceProfile._IndexModelItem>
|
||||
@{
|
||||
Authorization.Require(Claims.Config.DeviceProfile.Show);
|
||||
var showTags = Model.Any(i => i.IsLinked);
|
||||
}
|
||||
<table class="tableData deviceProfileTable">
|
||||
<tr>
|
||||
@@ -16,6 +17,10 @@
|
||||
<th class="deviceCount">
|
||||
Device Count
|
||||
</th>
|
||||
@if (showTags)
|
||||
{
|
||||
<th> </th>
|
||||
}
|
||||
</tr>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
@@ -32,11 +37,25 @@
|
||||
<td>
|
||||
@item.DeviceCount.ToString("n0")
|
||||
@if (item.DeviceDecommissionedCount > 0)
|
||||
{
|
||||
{
|
||||
<span class="smallMessage" title="@(item.DeviceDecommissionedCount.ToString("n0")) Decommissioned">
|
||||
(@(item.DeviceDecommissionedCount.ToString("n0")))</span>
|
||||
(@(item.DeviceDecommissionedCount.ToString("n0")))
|
||||
</span>
|
||||
}
|
||||
</td>
|
||||
@if (showTags)
|
||||
{
|
||||
<td>
|
||||
@if (item.IsLinked)
|
||||
{
|
||||
<i class="fa fa-link fa-lg success" title="Is Linked"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<text> </text>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Areas.Config.Views.DeviceProfile
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -37,9 +36,9 @@ namespace Disco.Web.Areas.Config.Views.DeviceProfile
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
|
||||
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DeviceProfile/_TableRender.cshtml")]
|
||||
public partial class TableRender : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Web.Areas.Config.Models.DeviceProfile._IndexModelItem>>
|
||||
public partial class _TableRender : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Web.Areas.Config.Models.DeviceProfile._IndexModelItem>>
|
||||
{
|
||||
public TableRender()
|
||||
public _TableRender()
|
||||
{
|
||||
}
|
||||
public override void Execute()
|
||||
@@ -48,6 +47,7 @@ namespace Disco.Web.Areas.Config.Views.DeviceProfile
|
||||
#line 2 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
|
||||
Authorization.Require(Claims.Config.DeviceProfile.Show);
|
||||
var showTags = Model.Any(i => i.IsLinked);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -72,16 +72,41 @@ WriteLiteral(">\r\n Type\r\n </th>\r\n <th");
|
||||
|
||||
WriteLiteral(" class=\"deviceCount\"");
|
||||
|
||||
WriteLiteral(">\r\n Device Count\r\n </th>\r\n </tr>\r\n");
|
||||
WriteLiteral(">\r\n Device Count\r\n </th>\r\n");
|
||||
|
||||
|
||||
#line 20 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 20 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
if (showTags)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th> </th>\r\n");
|
||||
|
||||
|
||||
#line 23 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
@@ -93,7 +118,7 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
#line 29 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
Write(Html.ActionLink(item.Name, MVC.Config.DeviceProfile.Index(item.Id)));
|
||||
|
||||
|
||||
@@ -104,7 +129,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
#line 32 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
Write(Html.DisplayFor(modelItem => item.Description));
|
||||
|
||||
|
||||
@@ -115,7 +140,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
#line 35 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
Write(Html.DisplayFor(modelItem => item.DistributionType));
|
||||
|
||||
|
||||
@@ -126,7 +151,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
#line 38 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
Write(item.DeviceCount.ToString("n0"));
|
||||
|
||||
|
||||
@@ -135,15 +160,15 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
#line 39 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
#line 39 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
if (item.DeviceDecommissionedCount > 0)
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
@@ -152,39 +177,110 @@ WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1065), Tuple.Create("\"", 1136)
|
||||
WriteAttribute("title", Tuple.Create(" title=\"", 1187), Tuple.Create("\"", 1258)
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1073), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount.ToString("n0")
|
||||
#line 41 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1195), Tuple.Create<System.Object, System.Int32>(item.DeviceDecommissionedCount.ToString("n0")
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1073), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1121), Tuple.Create("Decommissioned", 1122), true)
|
||||
, 1195), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1243), Tuple.Create("Decommissioned", 1244), true)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n (");
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
#line 42 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
Write(item.DeviceDecommissionedCount.ToString("n0"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(")</span>\r\n");
|
||||
WriteLiteral(")\r\n </span>\r\n");
|
||||
|
||||
|
||||
#line 38 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
#line 44 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 41 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
#line 46 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
if (showTags)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
if (item.IsLinked)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-link fa-lg success\"");
|
||||
|
||||
WriteLiteral(" title=\"Is Linked\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 60 "..\..\Areas\Config\Views\DeviceProfile\_TableRender.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,36 +3,67 @@
|
||||
Authorization.Require(Claims.Config.DocumentTemplate.Show);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates");
|
||||
var showTags = Model.DocumentTemplates.Keys.Any(i => i.DevicesLinkedGroup != null || i.UsersLinkedGroup != null ||
|
||||
i.FilterExpression != null || i.OnGenerateExpression != null || i.OnImportAttachmentExpression != null);
|
||||
}
|
||||
@if (Model.DocumentTemplates.Count == 0)
|
||||
{
|
||||
<div class="form" style="width: 450px; padding: 100px 0;">
|
||||
<h2>No document templates are configured</h2>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="tableData">
|
||||
if (Model.DocumentTemplates.Keys.Any(dt => dt.IsHidden))
|
||||
{
|
||||
<a id="Config_DocumentTemplates_ShowHidden" href="#" class="button small">Show Hidden (@(Model.DocumentTemplates.Keys.Count(dt => dt.IsHidden)))</a>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#Config_DocumentTemplates_ShowHidden').click(function () {
|
||||
$(this).remove();
|
||||
$('#Config_DocumentTemplates_List').find('tr.hidden').show();
|
||||
return false;
|
||||
}).detach().appendTo('#layout_PageHeading');
|
||||
})
|
||||
</script>
|
||||
}
|
||||
<table id="Config_DocumentTemplates_List" class="tableData">
|
||||
<tr>
|
||||
<th>Id
|
||||
</th>
|
||||
<th>Description
|
||||
</th>
|
||||
<th>Scope
|
||||
</th>
|
||||
<th>Id</th>
|
||||
<th>Description</th>
|
||||
<th>Scope</th>
|
||||
<th>Stored Instances</th>
|
||||
@if (showTags)
|
||||
{
|
||||
<th> </th>
|
||||
}
|
||||
</tr>
|
||||
@foreach (var item in Model.DocumentTemplates)
|
||||
@foreach (var pair in Model.DocumentTemplates)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.ActionLink(item.Id.ToString(), MVC.Config.DocumentTemplate.Index(item.Id))
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Description)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Scope)
|
||||
</td>
|
||||
var item = pair.Key;
|
||||
var storedCount = pair.Value;
|
||||
<tr class="@(item.IsHidden ? "hidden" : null)">
|
||||
<td>@Html.ActionLink(item.Id.ToString(), MVC.Config.DocumentTemplate.Index(item.Id))</td>
|
||||
<td>@Html.DisplayFor(modelItem => item.Description)</td>
|
||||
<td>@Html.DisplayFor(modelItem => item.Scope)</td>
|
||||
<td>@storedCount.ToString("N0")</td>
|
||||
@if (showTags)
|
||||
{
|
||||
<td>
|
||||
@if (item.DevicesLinkedGroup != null || item.UsersLinkedGroup != null)
|
||||
{
|
||||
<i class="fa fa-link fa-lg success" title="Is Linked"></i>
|
||||
}
|
||||
@if (item.FilterExpression != null || item.OnGenerateExpression != null || item.OnImportAttachmentExpression != null)
|
||||
{
|
||||
<i class="fa fa-bolt fa-lg alert" title="Has Expressions"></i>
|
||||
}
|
||||
@if (item.IsHidden)
|
||||
{
|
||||
<i class="fa fa-minus-square fa-lg error" title="Is Hidden"></i>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Areas.Config.Views.DocumentTemplate
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -50,6 +49,8 @@ namespace Disco.Web.Areas.Config.Views.DocumentTemplate
|
||||
Authorization.Require(Claims.Config.DocumentTemplate.Show);
|
||||
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates");
|
||||
var showTags = Model.DocumentTemplates.Keys.Any(i => i.DevicesLinkedGroup != null || i.UsersLinkedGroup != null ||
|
||||
i.FilterExpression != null || i.OnGenerateExpression != null || i.OnImportAttachmentExpression != null);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -57,7 +58,7 @@ namespace Disco.Web.Areas.Config.Views.DocumentTemplate
|
||||
WriteLiteral("\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
if (Model.DocumentTemplates.Count == 0)
|
||||
{
|
||||
|
||||
@@ -70,76 +71,264 @@ WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px; padding: 100px 0;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>No document templates are configured</h2>\r\n </div> \r\n");
|
||||
WriteLiteral(">\r\n <h2>No document templates are configured</h2>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 12 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 14 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Model.DocumentTemplates.Keys.Any(dt => dt.IsHidden))
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <a");
|
||||
|
||||
WriteLiteral(" id=\"Config_DocumentTemplates_ShowHidden\"");
|
||||
|
||||
WriteLiteral(" href=\"#\"");
|
||||
|
||||
WriteLiteral(" class=\"button small\"");
|
||||
|
||||
WriteLiteral(">Show Hidden (");
|
||||
|
||||
|
||||
#line 19 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Model.DocumentTemplates.Keys.Count(dt => dt.IsHidden));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(")</a>\r\n");
|
||||
|
||||
WriteLiteral(@" <script>
|
||||
$(function () {
|
||||
$('#Config_DocumentTemplates_ShowHidden').click(function () {
|
||||
$(this).remove();
|
||||
$('#Config_DocumentTemplates_List').find('tr.hidden').show();
|
||||
return false;
|
||||
}).detach().appendTo('#layout_PageHeading');
|
||||
})
|
||||
</script>
|
||||
");
|
||||
|
||||
|
||||
#line 29 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <table");
|
||||
|
||||
WriteLiteral(" id=\"Config_DocumentTemplates_List\"");
|
||||
|
||||
WriteLiteral(" class=\"tableData\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>Id\r\n </th>\r\n <th>Descripti" +
|
||||
"on\r\n </th>\r\n <th>Scope\r\n </th>\r\n </tr>\r\n" +
|
||||
"");
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>Id</th>\r\n <th>Description</th>\r\n " +
|
||||
" <th>Scope</th>\r\n <th>Stored Instances</th>\r\n");
|
||||
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
if (showTags)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th> </th>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 41 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
foreach (var item in Model.DocumentTemplates)
|
||||
#line 41 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
foreach (var pair in Model.DocumentTemplates)
|
||||
{
|
||||
var item = pair.Key;
|
||||
var storedCount = pair.Value;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n");
|
||||
WriteLiteral(" <tr");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1798), Tuple.Create("\"", 1840)
|
||||
|
||||
#line 45 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1806), Tuple.Create<System.Object, System.Int32>(item.IsHidden ? "hidden" : null
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 1806), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <td>");
|
||||
|
||||
|
||||
#line 28 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 46 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLink(item.Id.ToString(), MVC.Config.DocumentTemplate.Index(item.Id)));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 31 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.DisplayFor(modelItem => item.Description));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 34 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 48 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.DisplayFor(modelItem => item.Scope));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
WriteLiteral("</td>\r\n <td>");
|
||||
|
||||
|
||||
#line 37 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 49 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(storedCount.ToString("N0"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("</td>\r\n");
|
||||
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 50 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
if (showTags)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
if (item.DevicesLinkedGroup != null || item.UsersLinkedGroup != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-link fa-lg success\"");
|
||||
|
||||
WriteLiteral(" title=\"Is Linked\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 56 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
if (item.FilterExpression != null || item.OnGenerateExpression != null || item.OnImportAttachmentExpression != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-bolt fa-lg alert\"");
|
||||
|
||||
WriteLiteral(" title=\"Has Expressions\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 60 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
if (item.IsHidden)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-minus-square fa-lg error\"");
|
||||
|
||||
WriteLiteral(" title=\"Is Hidden\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 64 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 66 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 68 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +337,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n");
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 70 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -161,13 +350,13 @@ WriteLiteral(" class=\"actionBar\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 41 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 72 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 41 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 72 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.DocumentTemplate.UndetectedPages))
|
||||
{
|
||||
|
||||
@@ -175,14 +364,14 @@ WriteLiteral(">\r\n");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 74 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Undetected Pages", MVC.Config.DocumentTemplate.UndetectedPages()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 43 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 74 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -192,7 +381,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 45 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 76 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.DocumentTemplate.ShowStatus))
|
||||
{
|
||||
|
||||
@@ -200,14 +389,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 78 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Import Status", MVC.Config.DocumentTemplate.ImportStatus()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 78 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -217,7 +406,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 80 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.Show))
|
||||
{
|
||||
|
||||
@@ -225,14 +414,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 82 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Expression Browser", MVC.Config.DocumentTemplate.ExpressionBrowser()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 82 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
@@ -242,7 +431,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 53 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 84 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
if (Authorization.HasAll(Claims.Config.DocumentTemplate.Create, Claims.Config.DocumentTemplate.Configure))
|
||||
{
|
||||
|
||||
@@ -250,14 +439,14 @@ WriteLiteral(" ");
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 55 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 86 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create Document Template", MVC.Config.DocumentTemplate.Create()));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 55 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
#line 86 "..\..\Areas\Config\Views\DocumentTemplate\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -105,29 +105,29 @@
|
||||
<div>
|
||||
@if (canConfig)
|
||||
{
|
||||
<input id="DocumentTemplate_FlattenForm" type="checkbox" @(Model.DocumentTemplate.FlattenForm ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty)) />
|
||||
<label for="DocumentTemplate_FlattenForm">Flatten Form</label>
|
||||
<input id="DocumentTemplate_IsHidden" type="checkbox" @(Model.DocumentTemplate.IsHidden ? new MvcHtmlString("checked=\"checked\" ") : null) />
|
||||
<label for="DocumentTemplate_IsHidden">Hidden</label>
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#DocumentTemplate_FlattenForm'),
|
||||
$('#DocumentTemplate_IsHidden'),
|
||||
null,
|
||||
'@Url.Action(MVC.API.DocumentTemplate.UpdateFlattenForm(Model.DocumentTemplate.Id))',
|
||||
'FlattenForm'
|
||||
'@Url.Action(MVC.API.DocumentTemplate.UpdateIsHidden(Model.DocumentTemplate.Id))',
|
||||
'IsHidden'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<input id="DocumentTemplate_FlattenForm" type="checkbox" @(Model.DocumentTemplate.FlattenForm ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty)) disabled="disabled" />
|
||||
<label for="DocumentTemplate_FlattenForm">Flatten Form</label>
|
||||
<input id="DocumentTemplate_IsHidden" type="checkbox" @(Model.DocumentTemplate.IsHidden ? new MvcHtmlString("checked=\"checked\" ") : null) disabled="disabled" />
|
||||
<label for="DocumentTemplate_IsHidden">Hidden</label>
|
||||
}
|
||||
</div>
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-info-circle"></i>If selected when a document is generated all form elements will be removed and their content written in place.
|
||||
<i class="fa fa-info-circle"></i>If selected the template will not appear in the list of documents to generate.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -331,6 +331,41 @@
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
|
||||
</th>
|
||||
<td>
|
||||
<div>
|
||||
@if (canConfig)
|
||||
{
|
||||
<input id="DocumentTemplate_FlattenForm" type="checkbox" @(Model.DocumentTemplate.FlattenForm ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty)) />
|
||||
<label for="DocumentTemplate_FlattenForm">Flatten Form</label>
|
||||
@AjaxHelpers.AjaxLoader()
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
document.DiscoFunctions.PropertyChangeHelper(
|
||||
$('#DocumentTemplate_FlattenForm'),
|
||||
null,
|
||||
'@Url.Action(MVC.API.DocumentTemplate.UpdateFlattenForm(Model.DocumentTemplate.Id))',
|
||||
'FlattenForm'
|
||||
);
|
||||
});
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<input id="DocumentTemplate_FlattenForm" type="checkbox" @(Model.DocumentTemplate.FlattenForm ? new MvcHtmlString("checked=\"checked\" ") : new MvcHtmlString(string.Empty)) disabled="disabled" />
|
||||
<label for="DocumentTemplate_FlattenForm">Flatten Form</label>
|
||||
}
|
||||
</div>
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-info-circle"></i>When a document is generated all form elements will be removed and their content written in place if this option is selected.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -478,7 +513,7 @@
|
||||
}
|
||||
<div class="info-box">
|
||||
<p class="fa-p">
|
||||
<i class="fa fa-fw fa-info-circle"></i>This expression will be evaluated to determine if this template is shown in the <em>Generate Document</em> drop-down list.
|
||||
<i class="fa fa-fw fa-info-circle"></i>This expression will be evaluated to determine if this template is shown in the <em>Generate Document</em> drop-down list. If the template is hidden (see above) this expression is ignored.
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,13 +2,15 @@
|
||||
@{
|
||||
Authorization.Require(Claims.Config.UserFlag.Show);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags");
|
||||
var showTags = Model.UserFlags.Keys.Any(i => i.UserDevicesLinkedGroup != null || i.UsersLinkedGroup != null ||
|
||||
i.OnAssignmentExpression != null || i.OnUnassignmentExpression != null);
|
||||
}
|
||||
<div id="Config_UserFlags_Index">
|
||||
@if (Model.UserFlags.Count == 0)
|
||||
{
|
||||
<div class="form" style="width: 450px; padding: 100px 0;">
|
||||
<h2>No user flags are configured</h2>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -16,10 +18,16 @@
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Linked</th>
|
||||
<th>Current Assignments</th>
|
||||
@if (showTags)
|
||||
{
|
||||
<th> </th>
|
||||
}
|
||||
</tr>
|
||||
@foreach (var item in Model.UserFlags)
|
||||
@foreach (var pair in Model.UserFlags.OrderBy(i => i.Key.Name))
|
||||
{
|
||||
var item = pair.Key;
|
||||
var assignmentCount = pair.Value;
|
||||
<tr>
|
||||
<td>
|
||||
<a href="@Url.Action(MVC.Config.UserFlag.Index(item.Id))">
|
||||
@@ -27,24 +35,32 @@
|
||||
@item.Name
|
||||
</a>
|
||||
</td>
|
||||
<td>@if (string.IsNullOrWhiteSpace(item.Description))
|
||||
{
|
||||
<span class="smallMessage"><none></span>
|
||||
<td>
|
||||
@if (string.IsNullOrWhiteSpace(item.Description))
|
||||
{
|
||||
<span class="smallMessage"><none></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
@item.Description.ToHtmlComment()
|
||||
@item.Description.ToHtmlComment()
|
||||
}
|
||||
</td>
|
||||
<td>@if (item.UserDevicesLinkedGroup != null || item.UsersLinkedGroup != null)
|
||||
{
|
||||
<i class="fa fa-link fa-lg success"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa fa-unlink fa-lg information"></i>
|
||||
}
|
||||
<td>
|
||||
@assignmentCount.ToString("N0")
|
||||
</td>
|
||||
@if (showTags)
|
||||
{
|
||||
<td>
|
||||
@if (item.UserDevicesLinkedGroup != null || item.UsersLinkedGroup != null)
|
||||
{
|
||||
<i class="fa fa-link fa-lg success" title="Is Linked"></i>
|
||||
}
|
||||
@if (item.OnAssignmentExpression != null || item.OnUnassignmentExpression != null)
|
||||
{
|
||||
<i class="fa fa-bolt fa-lg alert" title="Has Expressions"></i>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -27,7 +27,6 @@ namespace Disco.Web.Areas.Config.Views.UserFlag
|
||||
using System.Web.UI;
|
||||
using System.Web.WebPages;
|
||||
using Disco;
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
@@ -49,6 +48,8 @@ namespace Disco.Web.Areas.Config.Views.UserFlag
|
||||
|
||||
Authorization.Require(Claims.Config.UserFlag.Show);
|
||||
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "User Flags");
|
||||
var showTags = Model.UserFlags.Keys.Any(i => i.UserDevicesLinkedGroup != null || i.UsersLinkedGroup != null ||
|
||||
i.OnAssignmentExpression != null || i.OnUnassignmentExpression != null);
|
||||
|
||||
|
||||
#line default
|
||||
@@ -60,13 +61,13 @@ WriteLiteral(" id=\"Config_UserFlags_Index\"");
|
||||
WriteLiteral(">\r\n");
|
||||
|
||||
|
||||
#line 7 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 7 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 9 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (Model.UserFlags.Count == 0)
|
||||
{
|
||||
|
||||
@@ -79,10 +80,10 @@ WriteLiteral(" class=\"form\"");
|
||||
|
||||
WriteLiteral(" style=\"width: 450px; padding: 100px 0;\"");
|
||||
|
||||
WriteLiteral(">\r\n <h2>No user flags are configured</h2>\r\n </div> \r\n");
|
||||
WriteLiteral(">\r\n <h2>No user flags are configured</h2>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 12 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 14 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -95,55 +96,82 @@ WriteLiteral(" <table");
|
||||
WriteLiteral(" class=\"tableData\"");
|
||||
|
||||
WriteLiteral(">\r\n <tr>\r\n <th>Name</th>\r\n <th>Descripti" +
|
||||
"on</th>\r\n <th>Linked</th>\r\n </tr>\r\n");
|
||||
"on</th>\r\n <th>Current Assignments</th>\r\n");
|
||||
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 22 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 22 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (showTags)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <th> </th>\r\n");
|
||||
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 21 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
foreach (var item in Model.UserFlags)
|
||||
#line 27 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
foreach (var pair in Model.UserFlags.OrderBy(i => i.Key.Name))
|
||||
{
|
||||
var item = pair.Key;
|
||||
var assignmentCount = pair.Value;
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <tr>\r\n <td>\r\n <a");
|
||||
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 776), Tuple.Create("\"", 830)
|
||||
WriteAttribute("href", Tuple.Create(" href=\"", 1211), Tuple.Create("\"", 1265)
|
||||
|
||||
#line 25 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 783), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.UserFlag.Index(item.Id))
|
||||
#line 33 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1218), Tuple.Create<System.Object, System.Int32>(Url.Action(MVC.Config.UserFlag.Index(item.Id))
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 783), false)
|
||||
, 1218), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">\r\n <i");
|
||||
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 864), Tuple.Create("\"", 917)
|
||||
, Tuple.Create(Tuple.Create("", 872), Tuple.Create("fa", 872), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 874), Tuple.Create("fa-", 875), true)
|
||||
WriteAttribute("class", Tuple.Create(" class=\"", 1299), Tuple.Create("\"", 1352)
|
||||
, Tuple.Create(Tuple.Create("", 1307), Tuple.Create("fa", 1307), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1309), Tuple.Create("fa-", 1310), true)
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 878), Tuple.Create<System.Object, System.Int32>(item.Icon
|
||||
#line 34 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1313), Tuple.Create<System.Object, System.Int32>(item.Icon
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 878), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 890), Tuple.Create("fa-lg", 891), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 896), Tuple.Create("d-", 897), true)
|
||||
, 1313), false)
|
||||
, Tuple.Create(Tuple.Create(" ", 1325), Tuple.Create("fa-lg", 1326), true)
|
||||
, Tuple.Create(Tuple.Create(" ", 1331), Tuple.Create("d-", 1332), true)
|
||||
|
||||
#line 26 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 899), Tuple.Create<System.Object, System.Int32>(item.IconColour
|
||||
#line 34 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 1334), Tuple.Create<System.Object, System.Int32>(item.IconColour
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 899), false)
|
||||
, 1334), false)
|
||||
);
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
@@ -151,95 +179,155 @@ WriteLiteral("></i>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 27 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 35 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(item.Name);
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </a>\r\n </td>\r\n <t" +
|
||||
"d>");
|
||||
"d>\r\n");
|
||||
|
||||
|
||||
#line 30 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 39 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (string.IsNullOrWhiteSpace(item.Description))
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <span");
|
||||
WriteLiteral(" <span");
|
||||
|
||||
WriteLiteral(" class=\"smallMessage\"");
|
||||
|
||||
WriteLiteral("><none></span>\r\n");
|
||||
|
||||
|
||||
#line 33 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(item.Description.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 36 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n <td>");
|
||||
|
||||
|
||||
#line 39 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (item.UserDevicesLinkedGroup != null || item.UsersLinkedGroup != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-link fa-lg success\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 42 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 45 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(item.Description.ToHtmlComment());
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-unlink fa-lg information\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 46 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 45 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
WriteLiteral(" </td>\r\n <td>\r\n");
|
||||
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 49 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(assignmentCount.ToString("N0"));
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\r\n </td>\r\n");
|
||||
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (showTags)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <td>\r\n");
|
||||
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 54 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (item.UserDevicesLinkedGroup != null || item.UsersLinkedGroup != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-link fa-lg success\"");
|
||||
|
||||
WriteLiteral(" title=\"Is Linked\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 58 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (item.OnAssignmentExpression != null || item.OnUnassignmentExpression != null)
|
||||
{
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" <i");
|
||||
|
||||
WriteLiteral(" class=\"fa fa-bolt fa-lg alert\"");
|
||||
|
||||
WriteLiteral(" title=\"Has Expressions\"");
|
||||
|
||||
WriteLiteral("></i>\r\n");
|
||||
|
||||
|
||||
#line 61 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </td>\r\n");
|
||||
|
||||
|
||||
#line 63 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral(" </tr>\r\n");
|
||||
|
||||
|
||||
#line 65 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -248,7 +336,7 @@ WriteLiteral(" </td>\r\n </tr>\r\n");
|
||||
WriteLiteral(" </table>\r\n");
|
||||
|
||||
|
||||
#line 51 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 67 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
@@ -257,7 +345,7 @@ WriteLiteral(" </table>\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 52 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 68 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
if (Authorization.Has(Claims.Config.UserFlag.Create))
|
||||
{
|
||||
|
||||
@@ -273,7 +361,7 @@ WriteLiteral(">\r\n");
|
||||
WriteLiteral(" ");
|
||||
|
||||
|
||||
#line 55 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 71 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
Write(Html.ActionLinkButton("Create User Flag", MVC.Config.UserFlag.Create()));
|
||||
|
||||
|
||||
@@ -282,7 +370,7 @@ WriteLiteral(" ");
|
||||
WriteLiteral("\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 57 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
#line 73 "..\..\Areas\Config\Views\UserFlag\Index.cshtml"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user