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:
@@ -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