feature: #158 adds job preference option to include all attachments on lodgment

This commit is contained in:
Gary Sharp committed 2024-12-11 17:01:42 +11:00
1 parent 25e3a8e1f1
commit 90c709c4c1
17 files changed
+346 -1

No files matched your search

@@ -41,6 +41,12 @@ namespace Disco.Data.Configuration.Modules
} }
} }
public bool LodgmentIncludeAllAttachmentsByDefault
{
get { return Get(false); }
set { Set(value); }
}
/// <summary> /// <summary>
/// Theme used in noticeboards by default. /// Theme used in noticeboards by default.
/// <see cref="Disco.Services.Extensions.UIHelpers.NoticeboardThemes"/> /// <see cref="Disco.Services.Extensions.UIHelpers.NoticeboardThemes"/>
@@ -35,6 +35,18 @@ namespace Disco.Web.Areas.API.Controllers
return Json("OK", JsonRequestBehavior.AllowGet); return Json("OK", JsonRequestBehavior.AllowGet);
} }
[DiscoAuthorize(Claims.Config.JobPreferences.Configure)]
public virtual ActionResult UpdateLodgmentIncludeAllAttachmentsByDefault(bool includeAllAttachmentsByDefault, bool redirect = false)
{
Database.DiscoConfiguration.JobPreferences.LodgmentIncludeAllAttachmentsByDefault = includeAllAttachmentsByDefault;
Database.SaveChanges();
if (redirect)
return RedirectToAction(MVC.Config.JobPreferences.Index());
else
return Json("OK", JsonRequestBehavior.AllowGet);
}
[DiscoAuthorize(Claims.Config.JobPreferences.Configure)] [DiscoAuthorize(Claims.Config.JobPreferences.Configure)]
public virtual ActionResult UpdateDefaultNoticeboardTheme(string DefaultNoticeboardTheme, bool redirect = false) public virtual ActionResult UpdateDefaultNoticeboardTheme(string DefaultNoticeboardTheme, bool redirect = false)
{ {
@@ -15,6 +15,7 @@ namespace Disco.Web.Areas.Config.Controllers
{ {
LongRunningJobDaysThreshold = Database.DiscoConfiguration.JobPreferences.LongRunningJobDaysThreshold, LongRunningJobDaysThreshold = Database.DiscoConfiguration.JobPreferences.LongRunningJobDaysThreshold,
StaleJobMinutesThreshold = Database.DiscoConfiguration.JobPreferences.StaleJobMinutesThreshold, StaleJobMinutesThreshold = Database.DiscoConfiguration.JobPreferences.StaleJobMinutesThreshold,
LodgmentIncludeAllAttachmentsByDefault = Database.DiscoConfiguration.JobPreferences.LodgmentIncludeAllAttachmentsByDefault,
DefaultNoticeboardTheme = Database.DiscoConfiguration.JobPreferences.DefaultNoticeboardTheme, DefaultNoticeboardTheme = Database.DiscoConfiguration.JobPreferences.DefaultNoticeboardTheme,
LocationMode = Database.DiscoConfiguration.JobPreferences.LocationMode, LocationMode = Database.DiscoConfiguration.JobPreferences.LocationMode,
LocationList = Database.DiscoConfiguration.JobPreferences.LocationList, LocationList = Database.DiscoConfiguration.JobPreferences.LocationList,
@@ -13,6 +13,7 @@ namespace Disco.Web.Areas.Config.Models.JobPreferences
{ {
public int LongRunningJobDaysThreshold { get; set; } public int LongRunningJobDaysThreshold { get; set; }
public int StaleJobMinutesThreshold { get; set; } public int StaleJobMinutesThreshold { get; set; }
public bool LodgmentIncludeAllAttachmentsByDefault { get; set; }
public string DefaultNoticeboardTheme { get; set; } public string DefaultNoticeboardTheme { get; set; }
public LocationModes LocationMode { get; set; } public LocationModes LocationMode { get; set; }
public List<string> LocationList { get; set; } public List<string> LocationList { get; set; }
@@ -12,6 +12,7 @@
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
} }
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.General); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.General);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Lodgment);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Reports); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Reports);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Locations); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Locations);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Expressions); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Expressions);
@@ -58,6 +58,7 @@ namespace Disco.Web.Areas.Config.Views.JobPreferences
Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons"); Html.BundleDeferred("~/ClientScripts/Modules/Disco-AjaxHelperIcons");
} }
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.General); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.General);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Lodgment);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Reports); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Reports);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Locations); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Locations);
Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Expressions); Html.RenderPartial(MVC.Config.JobPreferences.Views.Parts.Expressions);
@@ -0,0 +1,45 @@
@model Disco.Web.Areas.Config.Models.JobPreferences.IndexModel
@{
Authorization.Require(Claims.Config.JobPreferences.Show);
var canConfig = Authorization.Has(Claims.Config.JobPreferences.Configure);
}
<div id="Config_Lodgment" class="form" style="width: 530px;">
<h2>Job Lodgment</h2>
<table>
<tr>
<th style="width: 200px">
&nbsp;
</th>
<td>
@if (canConfig)
{
@Html.CheckBoxFor(model => model.LodgmentIncludeAllAttachmentsByDefault)
<label for="LodgmentIncludeAllAttachmentsByDefault">Include All Attachments by Default</label>
@AjaxHelpers.AjaxSave()
@AjaxHelpers.AjaxLoader()
<div class="info-box">
<p class="fa-p">
<i class="fa fa-info-circle"></i>If enabled, all attachments will be selected by default when lodging a job.
</p>
</div>
<script type="text/javascript">
$(function () {
document.DiscoFunctions.PropertyChangeHelper(
$('#LodgmentIncludeAllAttachmentsByDefault'),
null,
'@(Url.Action(MVC.API.JobPreferences.UpdateLodgmentIncludeAllAttachmentsByDefault()))',
'includeAllAttachmentsByDefault');
});
</script>
}
else
{
<span>
@(Model.LodgmentIncludeAllAttachmentsByDefault ? "Yes" : "No")
</span>
}
</td>
</tr>
</table>
</div>
@@ -0,0 +1,206 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Disco.Web.Areas.Config.Views.JobPreferences.Parts
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using Disco;
using Disco.Models.Repository;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Web;
using Disco.Web;
using Disco.Web.Extensions;
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/JobPreferences/Parts/Lodgment.cshtml")]
public partial class Lodgment : Disco.Services.Web.WebViewPage<Disco.Web.Areas.Config.Models.JobPreferences.IndexModel>
{
public Lodgment()
{
}
public override void Execute()
{
#line 2 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
Authorization.Require(Claims.Config.JobPreferences.Show);
var canConfig = Authorization.Has(Claims.Config.JobPreferences.Configure);
#line default
#line hidden
WriteLiteral("\r\n<div");
WriteLiteral(" id=\"Config_Lodgment\"");
WriteLiteral(" class=\"form\"");
WriteLiteral(" style=\"width: 530px;\"");
WriteLiteral(">\r\n <h2>Job Lodgment</h2>\r\n <table>\r\n <tr>\r\n <th");
WriteLiteral(" style=\"width: 200px\"");
WriteLiteral(">\r\n &nbsp;\r\n </th>\r\n <td>\r\n");
#line 15 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
#line default
#line hidden
#line 15 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
if (canConfig)
{
#line default
#line hidden
#line 17 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
Write(Html.CheckBoxFor(model => model.LodgmentIncludeAllAttachmentsByDefault));
#line default
#line hidden
#line 17 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
#line default
#line hidden
WriteLiteral(" <label");
WriteLiteral(" for=\"LodgmentIncludeAllAttachmentsByDefault\"");
WriteLiteral(">Include All Attachments by Default</label>\r\n");
#line 19 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
#line default
#line hidden
#line 19 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
Write(AjaxHelpers.AjaxSave());
#line default
#line hidden
#line 19 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
#line default
#line hidden
#line 20 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
Write(AjaxHelpers.AjaxLoader());
#line default
#line hidden
#line 20 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
#line default
#line hidden
WriteLiteral(" <div");
WriteLiteral(" class=\"info-box\"");
WriteLiteral(">\r\n <p");
WriteLiteral(" class=\"fa-p\"");
WriteLiteral(">\r\n <i");
WriteLiteral(" class=\"fa fa-info-circle\"");
WriteLiteral("></i>If enabled, all attachments will be selected by default when lodging a job.\r" +
"\n </p>\r\n </div>\r\n");
WriteLiteral(" <script");
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n document.DiscoFun" +
"ctions.PropertyChangeHelper(\r\n $(\'#LodgmentIncludeAll" +
"AttachmentsByDefault\'),\r\n null,\r\n " +
" \'");
#line 31 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
Write(Url.Action(MVC.API.JobPreferences.UpdateLodgmentIncludeAllAttachmentsByDefault()));
#line default
#line hidden
WriteLiteral("\',\r\n \'includeAllAttachmentsByDefault\');\r\n " +
" });\r\n </script>\r\n");
#line 35 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <span>\r\n");
WriteLiteral(" ");
#line 39 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
Write(Model.LodgmentIncludeAllAttachmentsByDefault ? "Yes" : "No");
#line default
#line hidden
WriteLiteral("\r\n </span>\r\n");
#line 41 "..\..\Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
}
}
}
#pragma warning restore 1591
+3
View File
@@ -1284,6 +1284,9 @@ h1.Config_DocumentTemplates {
#Config_AuthRoles_Subjects_Update_Dialog #Config_AuthRoles_Subjects_Update_Dialog_List li .remove:hover { #Config_AuthRoles_Subjects_Update_Dialog #Config_AuthRoles_Subjects_Update_Dialog_List li .remove:hover {
opacity: 1; opacity: 1;
} }
#Config_Lodgment {
margin-top: 10px;
}
#Config_ReportPrefs { #Config_ReportPrefs {
margin-top: 10px; margin-top: 10px;
} }
+4
View File
@@ -1541,6 +1541,10 @@ h1.Config_DocumentTemplates {
} }
} }
#Config_Lodgment {
margin-top: 10px;
}
#Config_ReportPrefs { #Config_ReportPrefs {
margin-top: 10px; margin-top: 10px;
+1 -1
View File
@@ -1 +1 @@
.tableData{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff;}.tableData>tbody>tr:nth-child(odd)>td{background-color:hsl(0,0%,98.5%);}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4;}.tableData>tbody>tr:hover>td{background-color:hsl(0,0%,97.5%);}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4;}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse;}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff;}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8;}.tableDataContainer{background-color:#fff;}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0;}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right;}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa;}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right;}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right;}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer;}.subtleUntilHover{-moz-opacity:.3;opacity:.3;}.subtleUntilHover:hover{-moz-opacity:1;opacity:1;}#updateAvailableContainer{float:right;border:1px dashed #ddd;background-color:#fff;font-size:.6em;line-height:1em;padding:10px 10px 4px 70px;text-align:right;height:50px;}#updateAvailableContainer i{position:absolute;display:block;height:64px;width:64px;vertical-align:middle;margin-left:-70px;font-size:50px;color:#e51400;}#updateAvailableContainer button{font-size:12px;margin-top:8px;}.Config_HideAdvanced .Config_HideAdvanced_Item{display:none;}.Config_LinkedGroup_Instance{margin:4px 0 8px 4px;padding:4px 0 4px 6px;border-left:4px solid #ccc;background-color:#fff;}.Config_LinkedGroup_Instance div.code{margin-left:2px;}#Config_LinkedGroup_Dialog h3{margin-bottom:6px;}#Config_LinkedGroup_Dialog table.input{margin-top:12px;}#Config_LinkedGroup_Dialog table.input th{text-align:right;}#expressionEditor #expressionEditorExceptionContainer{display:none;border:1px dashed #ff9696;background-color:#ffd8d8;margin:10px 0;padding:10px;}#expressionEditor #expressionEditorContainer{border:1px solid #1e6dab;background-color:#f4f4f4;height:100px;}.expressionTree span.dynatree-node span.dynatree-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAGFklEQVRYw+WVe1BUVRzHvwE+QE0ZLF1Y3gTGSxIl4rk85KHFe0cUiIc8IjNx8gUmLJAFpbIKKJmmCSOi4q48zAe6LqAoioiIMlpOqYWx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+RqhLPseC0gFsNVDYeCQRO/xkCkUQLjtJYTemFa0xcUjsTwa0S1kyzjoe7rRvW5u0Hcxw3d2s2BEr+cYw5VCaNqOFu1x6B0PtWJomyTLvzvRHxFTQ3FPdmUekaAq44MqwE1sTPTGQADKEPp1/T4AcgjUvCHIO0YYPGSVC1FRWI1qfg5y8w6hPGkpEk6kI6MuDnH9ADA8aFApHj54UB3qk0M9zUijM42yRgTDxiSdE6q/ZLYoWTnj0rmhTyH0vfaQD5RBn1MBPfeTJPu10HNpgFVK2EAAcgj9FpQA0JCaj68tQbyIPfD8C0sRFvcBQlnWCAHbdqnsCGyYRyAIjqKyoAKVW2MQ25yJzLoVSGkk82sc8ncO9nz3QQB4PDUsJz0soH0KFt+ZIVU0Yzo0AFPuR4OyLW16jaTpndaDH2l6nPNmcK63gHOjFWanRaoCMCiUAVDT1HwWkwiPYzUDIQxdBTzbLGQLDqCsiGZ9LdY1RCPmeglKLKUb9H1dZUmMipKKIUdZPldWFPPmsABId9eESbCiB8DQuxAGpAL0PA7A85yptAJoD6AVMFoAyuaXX8+Wzu2/ZkZ6FHKRa0ErIRZLmyMR2c4H31ZxU9+n/xE4SP7FSBNHkGgaQm6wwG03RsRNG8Qxs4cHYNsyCd6npsLrog6czr1Osq0Lb9LxXepMiMzhdcGSyBauDXNGBYBKlfkRVoA88pFvswQRt7OQZd/vRh8ARaa5zHjVFfBs7vAAqHldZwuwA21gnjAPs9e64C2eNxy+fBeOeSFw2hGu0EgBKJe/077Gf2t+2DAKfLtfBTCMpkJHGB3wGANkMJbIYWyGB0ANjVajCWp6rM3T0Ji2ifxUQV2rQqHxU4i0KomqoKHZN06sGhrAfxVjbX4M4m/gZza+uQwOHQAAAABJRU5ErkJggg==);background-position-y:0;}.expressionTree span.dynatree-node.object span.dynatree-icon{background-position-x:0;}.expressionTree span.dynatree-node.parameter span.dynatree-icon{background-position-x:-16px;}.expressionTree span.dynatree-node.function span.dynatree-icon{background-position-x:-32px;}.expressionTree span.dynatreeLine truncated .tableData{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff;}.tableData>tbody>tr:nth-child(odd)>td{background-color:hsl(0,0%,98.5%);}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4;}.tableData>tbody>tr:hover>td{background-color:hsl(0,0%,97.5%);}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4;}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse;}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff;}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8;}.tableDataContainer{background-color:#fff;}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0;}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right;}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa;}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right;}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right;}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer;}.subtleUntilHover{-moz-opacity:.3;opacity:.3;}.subtleUntilHover:hover{-moz-opacity:1;opacity:1;}#updateAvailableContainer{float:right;border:1px dashed #ddd;background-color:#fff;font-size:.6em;line-height:1em;padding:10px 10px 4px 70px;text-align:right;height:50px;}#updateAvailableContainer i{position:absolute;display:block;height:64px;width:64px;vertical-align:middle;margin-left:-70px;font-size:50px;color:#e51400;}#updateAvailableContainer button{font-size:12px;margin-top:8px;}.Config_HideAdvanced .Config_HideAdvanced_Item{display:none;}.Config_LinkedGroup_Instance{margin:4px 0 8px 4px;padding:4px 0 4px 6px;border-left:4px solid #ccc;background-color:#fff;}.Config_LinkedGroup_Instance div.code{margin-left:2px;}#Config_LinkedGroup_Dialog h3{margin-bottom:6px;}#Config_LinkedGroup_Dialog table.input{margin-top:12px;}#Config_LinkedGroup_Dialog table.input th{text-align:right;}#expressionEditor #expressionEditorExceptionContainer{display:none;border:1px dashed #ff9696;background-color:#ffd8d8;margin:10px 0;padding:10px;}#expressionEditor #expressionEditorContainer{border:1px solid #1e6dab;background-color:#f4f4f4;height:100px;}.expressionTree span.dynatree-node span.dynatree-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAGFklEQVRYw+WVe1BUVRzHvwE+QE0ZLF1Y3gTGSxIl4rk85KHFe0cUiIc8IjNx8gUmLJAFpbIKKJmmCSOi4q48zAe6LqAoioiIMlpOqYWxKCroWFNzO2eXXRdYCBqmf/rNfPece+6598738/ud3wJjHPV8WNwphoSO+L+F3HznWaTVbcGDsYQggkhjJPucWIhcGYYP5xnAKnkh0n1skcGxRobzLGx0MsYmR2MUO5qBMzEAiXhvxmLZU94tq/rJqzUV3q08zL+ei/lt+fC9sRt+N0vh334U/rdOYMEtMRnPqzL/4CxSu46jQFIJgSoI93FfZ7Tmi1FsVoSitWuwhv1Pe51ZcO0+g0BHNkqYH7BVrueXsPlhDYou7cYhrh2OOCzCdhQg7SWAcCYK4X/GIPyPBHBfJIP7fAWCe1chuGc9Qp5kIfhRDgIfbkHQo0IESnaCI74yKPNnkNZ5HPldxLxEiEuSw7i7fgl65BCo+Soc2zkaCHLzZSgLpeM2bBsWAscSM90McID5GTuy41BKzfdexOYn51Ao+R5lvwpR9bsAP65chr0z+TijqgLWw7dtI/zatsoy315GVA2/WyJp1uVyr7k6oOxT5ea7BGgk5u+pMt+N7pCRQtiP/VbUdA1qPLrxNLgFrR/T6wLsMlRscj+bpZAdn+tph5SeBvDi/HGYQjCfjObHtdj+8CRKOwQQ/XIIVyT78GhRFAQ6n6NJ9hKrZeGKF3IZdXDIefO/PQH2l7UQUD8FLnXaZG060Uy8c14PnAYjsJwa6Xb5me86KS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6czr1Osq0Lb9LxXepMiMzhdcGSyBauDXNGBYBKlfkRVoA88pFvswQRt7OQZd/vRh8ARaa5zHjVFfBs7vAAqHldZwuwA21gnjAPs9e64C2eNxy+fBeOeSFw2hGu0EgBKJe/077Gf2t+2DAKfLtfBTCMpkJHGB3wGANkMJbIYWyGB0ANjVajCWp6rM3T0Ji2ifxUQV2rQqHxU4i0KomqoKHZN06sGhrAfxVjbX4M4m/gZza+uQwOHQAAAABJRU5ErkJggg==);background-position-y:0;}.expressionTree span.dynatree-node.object span.dynatree-icon{background-position-x:0;}.expressionTree span.dynatree-node.parameter span.dynatree-icon{background-position-x:-16px;}.expressionTree span.dynatree-node.function span.dynatree-icon{background-position-x:-32px;}.expressionTree span.dynatreeLine truncated
+9
View File
@@ -302,6 +302,11 @@
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<DependentUpon>General.cshtml</DependentUpon> <DependentUpon>General.cshtml</DependentUpon>
</Compile> </Compile>
<Compile Include="Areas\Config\Views\JobPreferences\Parts\Lodgment.generated.cs">
<DependentUpon>Lodgment.cshtml</DependentUpon>
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Areas\Config\Views\JobPreferences\Parts\Locations.generated.cs"> <Compile Include="Areas\Config\Views\JobPreferences\Parts\Locations.generated.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
@@ -1324,6 +1329,10 @@
<Generator>RazorGenerator</Generator> <Generator>RazorGenerator</Generator>
<LastGenOutput>General.generated.cs</LastGenOutput> <LastGenOutput>General.generated.cs</LastGenOutput>
</None> </None>
<Content Include="Areas\Config\Views\JobPreferences\Parts\Lodgment.cshtml">
<Generator>RazorGenerator</Generator>
<LastGenOutput>Lodgment.generated.cs</LastGenOutput>
</Content>
<None Include="Areas\Config\Views\JobPreferences\Parts\Locations.cshtml"> <None Include="Areas\Config\Views\JobPreferences\Parts\Locations.cshtml">
<Generator>RazorGenerator</Generator> <Generator>RazorGenerator</Generator>
<LastGenOutput>Locations.generated.cs</LastGenOutput> <LastGenOutput>Locations.generated.cs</LastGenOutput>
@@ -73,6 +73,12 @@ namespace Disco.Web.Areas.API.Controllers
} }
[NonAction] [NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode] [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public virtual System.Web.Mvc.ActionResult UpdateLodgmentIncludeAllAttachmentsByDefault()
{
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateLodgmentIncludeAllAttachmentsByDefault);
}
[NonAction]
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public virtual System.Web.Mvc.ActionResult UpdateDefaultNoticeboardTheme() public virtual System.Web.Mvc.ActionResult UpdateDefaultNoticeboardTheme()
{ {
return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDefaultNoticeboardTheme); return new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateDefaultNoticeboardTheme);
@@ -131,6 +137,7 @@ namespace Disco.Web.Areas.API.Controllers
{ {
public readonly string UpdateLongRunningJobDaysThreshold = "UpdateLongRunningJobDaysThreshold"; public readonly string UpdateLongRunningJobDaysThreshold = "UpdateLongRunningJobDaysThreshold";
public readonly string UpdateStaleJobMinutesThreshold = "UpdateStaleJobMinutesThreshold"; public readonly string UpdateStaleJobMinutesThreshold = "UpdateStaleJobMinutesThreshold";
public readonly string UpdateLodgmentIncludeAllAttachmentsByDefault = "UpdateLodgmentIncludeAllAttachmentsByDefault";
public readonly string UpdateDefaultNoticeboardTheme = "UpdateDefaultNoticeboardTheme"; public readonly string UpdateDefaultNoticeboardTheme = "UpdateDefaultNoticeboardTheme";
public readonly string UpdateLocationMode = "UpdateLocationMode"; public readonly string UpdateLocationMode = "UpdateLocationMode";
public readonly string UpdateLocationList = "UpdateLocationList"; public readonly string UpdateLocationList = "UpdateLocationList";
@@ -145,6 +152,7 @@ namespace Disco.Web.Areas.API.Controllers
{ {
public const string UpdateLongRunningJobDaysThreshold = "UpdateLongRunningJobDaysThreshold"; public const string UpdateLongRunningJobDaysThreshold = "UpdateLongRunningJobDaysThreshold";
public const string UpdateStaleJobMinutesThreshold = "UpdateStaleJobMinutesThreshold"; public const string UpdateStaleJobMinutesThreshold = "UpdateStaleJobMinutesThreshold";
public const string UpdateLodgmentIncludeAllAttachmentsByDefault = "UpdateLodgmentIncludeAllAttachmentsByDefault";
public const string UpdateDefaultNoticeboardTheme = "UpdateDefaultNoticeboardTheme"; public const string UpdateDefaultNoticeboardTheme = "UpdateDefaultNoticeboardTheme";
public const string UpdateLocationMode = "UpdateLocationMode"; public const string UpdateLocationMode = "UpdateLocationMode";
public const string UpdateLocationList = "UpdateLocationList"; public const string UpdateLocationList = "UpdateLocationList";
@@ -173,6 +181,15 @@ namespace Disco.Web.Areas.API.Controllers
public readonly string StaleJobMinutesThreshold = "StaleJobMinutesThreshold"; public readonly string StaleJobMinutesThreshold = "StaleJobMinutesThreshold";
public readonly string redirect = "redirect"; public readonly string redirect = "redirect";
} }
static readonly ActionParamsClass_UpdateLodgmentIncludeAllAttachmentsByDefault s_params_UpdateLodgmentIncludeAllAttachmentsByDefault = new ActionParamsClass_UpdateLodgmentIncludeAllAttachmentsByDefault();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionParamsClass_UpdateLodgmentIncludeAllAttachmentsByDefault UpdateLodgmentIncludeAllAttachmentsByDefaultParams { get { return s_params_UpdateLodgmentIncludeAllAttachmentsByDefault; } }
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public class ActionParamsClass_UpdateLodgmentIncludeAllAttachmentsByDefault
{
public readonly string includeAllAttachmentsByDefault = "includeAllAttachmentsByDefault";
public readonly string redirect = "redirect";
}
static readonly ActionParamsClass_UpdateDefaultNoticeboardTheme s_params_UpdateDefaultNoticeboardTheme = new ActionParamsClass_UpdateDefaultNoticeboardTheme(); static readonly ActionParamsClass_UpdateDefaultNoticeboardTheme s_params_UpdateDefaultNoticeboardTheme = new ActionParamsClass_UpdateDefaultNoticeboardTheme();
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode] [GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
public ActionParamsClass_UpdateDefaultNoticeboardTheme UpdateDefaultNoticeboardThemeParams { get { return s_params_UpdateDefaultNoticeboardTheme; } } public ActionParamsClass_UpdateDefaultNoticeboardTheme UpdateDefaultNoticeboardThemeParams { get { return s_params_UpdateDefaultNoticeboardTheme; } }
@@ -283,6 +300,19 @@ namespace Disco.Web.Areas.API.Controllers
return callInfo; return callInfo;
} }
[NonAction]
partial void UpdateLodgmentIncludeAllAttachmentsByDefaultOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, bool includeAllAttachmentsByDefault, bool redirect);
[NonAction]
public override System.Web.Mvc.ActionResult UpdateLodgmentIncludeAllAttachmentsByDefault(bool includeAllAttachmentsByDefault, bool redirect)
{
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.UpdateLodgmentIncludeAllAttachmentsByDefault);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "includeAllAttachmentsByDefault", includeAllAttachmentsByDefault);
ModelUnbinderHelpers.AddRouteValues(callInfo.RouteValueDictionary, "redirect", redirect);
UpdateLodgmentIncludeAllAttachmentsByDefaultOverride(callInfo, includeAllAttachmentsByDefault, redirect);
return callInfo;
}
[NonAction] [NonAction]
partial void UpdateDefaultNoticeboardThemeOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string DefaultNoticeboardTheme, bool redirect); partial void UpdateDefaultNoticeboardThemeOverride(T4MVC_System_Web_Mvc_ActionResult callInfo, string DefaultNoticeboardTheme, bool redirect);
@@ -110,11 +110,13 @@ namespace Disco.Web.Areas.Config.Controllers
public readonly string Expressions = "Expressions"; public readonly string Expressions = "Expressions";
public readonly string General = "General"; public readonly string General = "General";
public readonly string Locations = "Locations"; public readonly string Locations = "Locations";
public readonly string Lodgment = "Lodgment";
public readonly string Reports = "Reports"; public readonly string Reports = "Reports";
} }
public readonly string Expressions = "~/Areas/Config/Views/JobPreferences/Parts/Expressions.cshtml"; public readonly string Expressions = "~/Areas/Config/Views/JobPreferences/Parts/Expressions.cshtml";
public readonly string General = "~/Areas/Config/Views/JobPreferences/Parts/General.cshtml"; public readonly string General = "~/Areas/Config/Views/JobPreferences/Parts/General.cshtml";
public readonly string Locations = "~/Areas/Config/Views/JobPreferences/Parts/Locations.cshtml"; public readonly string Locations = "~/Areas/Config/Views/JobPreferences/Parts/Locations.cshtml";
public readonly string Lodgment = "~/Areas/Config/Views/JobPreferences/Parts/Lodgment.cshtml";
public readonly string Reports = "~/Areas/Config/Views/JobPreferences/Parts/Reports.cshtml"; public readonly string Reports = "~/Areas/Config/Views/JobPreferences/Parts/Reports.cshtml";
} }
} }
@@ -112,10 +112,18 @@ namespace Disco.Web.Models.Job
OrganisationAddress = OrganisationAddresses.FirstOrDefault(oa => oa.Id == OrganisationAddressId.Value); OrganisationAddress = OrganisationAddresses.FirstOrDefault(oa => oa.Id == OrganisationAddressId.Value);
if (AttachmentIds == null) if (AttachmentIds == null)
{
if (Database.DiscoConfiguration.JobPreferences.LodgmentIncludeAllAttachmentsByDefault)
{
Attachments = Job.JobAttachments.ToList();
AttachmentIds = Attachments.Select(a => a.Id).ToList();
}
else
{ {
AttachmentIds = new List<int>(); AttachmentIds = new List<int>();
Attachments = new List<Disco.Models.Repository.JobAttachment>(); Attachments = new List<Disco.Models.Repository.JobAttachment>();
} }
}
else else
{ {
Attachments = Job.JobAttachments.Where(ja => AttachmentIds.Contains(ja.Id)).ToList(); Attachments = Job.JobAttachments.Where(ja => AttachmentIds.Contains(ja.Id)).ToList();
+8
View File
@@ -128,10 +128,18 @@ namespace Disco.Web.Models.Job
RepairDescription = RepairDescription.Trim(); RepairDescription = RepairDescription.Trim();
if (PublishAttachmentIds == null) if (PublishAttachmentIds == null)
{
if (Database.DiscoConfiguration.JobPreferences.LodgmentIncludeAllAttachmentsByDefault)
{
PublishAttachments = Job.JobAttachments.ToList();
PublishAttachmentIds = PublishAttachments.Select(a => a.Id).ToList();
}
else
{ {
PublishAttachmentIds = new List<int>(); PublishAttachmentIds = new List<int>();
PublishAttachments = new List<Disco.Models.Repository.JobAttachment>(); PublishAttachments = new List<Disco.Models.Repository.JobAttachment>();
} }
}
else else
{ {
PublishAttachments = Job.JobAttachments.Where(ja => PublishAttachmentIds.Contains(ja.Id)).ToList(); PublishAttachments = Job.JobAttachments.Where(ja => PublishAttachmentIds.Contains(ja.Id)).ToList();
+8
View File
@@ -128,10 +128,18 @@ namespace Disco.Web.Models.Job
FaultDescription = FaultDescription.Trim(); FaultDescription = FaultDescription.Trim();
if (PublishAttachmentIds == null) if (PublishAttachmentIds == null)
{
if (Database.DiscoConfiguration.JobPreferences.LodgmentIncludeAllAttachmentsByDefault)
{
PublishAttachments = Job.JobAttachments.ToList();
PublishAttachmentIds = PublishAttachments.Select(a => a.Id).ToList();
}
else
{ {
PublishAttachmentIds = new List<int>(); PublishAttachmentIds = new List<int>();
PublishAttachments = new List<Disco.Models.Repository.JobAttachment>(); PublishAttachments = new List<Disco.Models.Repository.JobAttachment>();
} }
}
else else
{ {
PublishAttachments = Job.JobAttachments.Where(ja => PublishAttachmentIds.Contains(ja.Id)).ToList(); PublishAttachments = Job.JobAttachments.Where(ja => PublishAttachmentIds.Contains(ja.Id)).ToList();