allow toggle of automated penalties display on the webfront

issue #112
fix small issue with script plugin loading
This commit is contained in:
RaidMax
2020-02-12 13:13:59 -06:00
parent c3c21a7749
commit f430dab3a7
9 changed files with 134 additions and 36 deletions

View File

@ -18,21 +18,23 @@ namespace WebfrontCore.Controllers
}
public IActionResult List(PenaltyType showOnly = PenaltyType.Any)
public IActionResult List(PenaltyType showOnly = PenaltyType.Any, bool hideAutomatedPenalties = true)
{
ViewBag.Description = "List of all the recent penalties (bans, kicks, warnings) on IW4MAdmin";
ViewBag.Title = Localization["WEBFRONT_PENALTY_TITLE"];
ViewBag.Keywords = "IW4MAdmin, penalties, ban, kick, warns";
ViewBag.HideAutomatedPenalties = hideAutomatedPenalties;
return View(showOnly);
}
public async Task<IActionResult> ListAsync(int offset = 0, PenaltyType showOnly = PenaltyType.Any)
public async Task<IActionResult> ListAsync(int offset = 0, PenaltyType showOnly = PenaltyType.Any, bool hideAutomatedPenalties = true)
{
return await Task.FromResult(View("_List", new ViewModels.PenaltyFilterInfo()
{
Offset = offset,
ShowOnly = showOnly
ShowOnly = showOnly,
IgnoreAutomated = hideAutomatedPenalties
}));
}