mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-06 09:36:20 +00:00
Show dismissed case count on mod panel
This commit is contained in:
parent
0e9fbfdbb7
commit
22fc2ead98
5 changed files with 37 additions and 5 deletions
|
@ -38,4 +38,16 @@ else
|
|||
@await Html.PartialAsync("Partials/AdminPanelStatisticPartial", statistic)
|
||||
<br>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<h2>Actions</h2>
|
||||
|
||||
<a href="/moderation/bannedUsers" class="ui red button">
|
||||
<i class="users icon"></i>
|
||||
<span>View banned users</span>
|
||||
</a><br/><br/>
|
||||
|
||||
<a href="/moderation/hiddenSlots" class="ui yellow button">
|
||||
<i class="certificate icon"></i>
|
||||
<span>View hidden levels</span>
|
||||
</a>
|
|
@ -19,8 +19,18 @@ public class ModPanelPage : BaseLayout
|
|||
if (user == null) return this.Redirect("~/login");
|
||||
if (!user.IsModerator) return this.NotFound();
|
||||
|
||||
this.Statistics.Add(new AdminPanelStatistic("Reports", await StatisticsHelper.ReportCount(), "/moderation/reports/0"));
|
||||
this.Statistics.Add(new AdminPanelStatistic("Cases", await StatisticsHelper.CaseCount(), "/moderation/cases/0"));
|
||||
this.Statistics.Add(new AdminPanelStatistic(
|
||||
statisticNamePlural: "Reports",
|
||||
count: await StatisticsHelper.ReportCount(),
|
||||
viewAllEndpoint: "/moderation/reports/0")
|
||||
);
|
||||
|
||||
this.Statistics.Add(new AdminPanelStatistic(
|
||||
statisticNamePlural: "Cases",
|
||||
count: await StatisticsHelper.DismissedCaseCount(),
|
||||
viewAllEndpoint: "/moderation/cases/0",
|
||||
secondStatistic: await StatisticsHelper.CaseCount())
|
||||
);
|
||||
|
||||
return this.Page();
|
||||
}
|
||||
|
|
|
@ -12,6 +12,13 @@
|
|||
{
|
||||
<h2>@Model.StatisticNamePlural</h2>
|
||||
}
|
||||
<h3>@Model.Count</h3>
|
||||
@if (Model.SecondStatistic == null)
|
||||
{
|
||||
<h3>@Model.Count</h3>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h3>@Model.Count / @Model.SecondStatistic</h3>
|
||||
}
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue