IW4M-Admin/WebfrontCore/Views/Penalty/List.cshtml
RaidMax 3092a529e9 add penalties for angle info
queue Tell/Say to prevent plugins from throwing exception when server is offlline
fixed CPU usage issue over time
sort penalties by type on webfront
2018-05-03 23:22:10 -05:00

65 lines
2.5 KiB
Plaintext

@model SharedLibraryCore.Objects.Penalty.PenaltyType
<h4 class="pb-2 text-center ">@ViewBag.Title</h4>
<div class="row">
<select class="form-control bg-dark text-muted" id="penalty_filter_selection">
@{
foreach (var penaltyType in Enum.GetValues(typeof(SharedLibraryCore.Objects.Penalty.PenaltyType)))
{
if ((SharedLibraryCore.Objects.Penalty.PenaltyType)penaltyType == SharedLibraryCore.Objects.Penalty.PenaltyType.Any)
{
if (Model == SharedLibraryCore.Objects.Penalty.PenaltyType.Any)
{
<option value="@Convert.ToInt32(penaltyType)" selected="selected" )>Show @penaltyType.ToString()</option>
}
else
{
<option value="@Convert.ToInt32(penaltyType)" )>Show @penaltyType.ToString()</option>
}
}
else
{
if ((SharedLibraryCore.Objects.Penalty.PenaltyType)penaltyType == Model)
{
<option value="@Convert.ToInt32(penaltyType)" selected="selected">Show only @penaltyType.ToString()s</option>
}
else
{
<option value="@Convert.ToInt32(penaltyType)" )>Show only @penaltyType.ToString()s</option>
}
}
}
}
</select>
</div>
<div class="row">
<table class="table table-striped">
<thead class="d-none d-md-table-header-group">
<tr class="bg-primary pt-2 pb-2">
<th scope="col">Name</th>
<th scope="col">Type</th>
<th scope="col">Offense</th>
<th scope="col">Admin</th>
<th scope="col" class="text-right">Time/Left</th>
</tr>
</thead>
<tbody id="penalty_table" class="border-bottom bg-dark">
@await Component.InvokeAsync("PenaltyList", new WebfrontCore.ViewModels.PenaltyFilterInfo()
{
Offset = 0,
ShowOnly = Model
})
</tbody>
</table>
<table class="table d-table d-md-none">
<tbody></tbody>
</table>
<span id="load_penalties_button" class="oi oi-chevron-bottom text-center text-primary w-100 h3 pb-0 mb-0 d-none d-md-block"></span>
</div>
@section scripts {
<environment include="Development">
<script type="text/javascript" src="~/js/penalty.js"></script>
</environment>
}