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:
Gary Sharp
2016-11-10 17:42:10 +11:00
parent b52cbcb94a
commit 4c91d03385
55 changed files with 1485 additions and 613 deletions
@@ -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>&nbsp;</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