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:
@@ -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
Reference in New Issue
Block a user