IW4M-Admin/WebfrontCore/Views/Client/Find/Index.cshtml
2022-04-19 18:43:58 -05:00

74 lines
2.7 KiB
Plaintext

@model IList<SharedLibraryCore.Dtos.PlayerInfo>
@{
var loc = Utilities.CurrentLocalization.LocalizationIndex;
}
<!-- desktop -->
<div class="content mt-0">
<h2 class="content-title mt-20">@ViewBag.ResultCount result(s) for <span class="badge badge-primary font-size-18">@ViewBag.SearchTerm</span></h2>
<table class="table d-none d-md-table">
<thead>
<tr class="bg-primary text-light">
<td>@loc["WEBFRONT_PENALTY_TEMPLATE_NAME"]</td>
<td>@loc["WEBFRONT_PROFILE_LEVEL"]</td>
<td class="text-right">@loc["WEBFRONT_SEARCH_LAST_CONNECTED"]</td>
</tr>
</thead>
<tbody>
@foreach (var client in Model)
{
<tr class="bg-dark-dm bg-light-lm">
<td class="col-5">
<a asp-controller="Client" asp-action="Profile" asp-route-id="@client.ClientId">
<color-code value="@client.Name"></color-code>
</a>
</td>
@if (!ViewBag.Authorized && ViewBag.EnablePrivilegedUserPrivacy)
{
<td class="col-3 level-color-0">@loc["GLOBAL_PERMISSION_USER"]</td>
}
else
{
<td class="col-3 level-color-@client.LevelInt">@client.Level</td>
}
<td class="col-4 text-right">@client.LastConnection.HumanizeForCurrentCulture()</td>
</tr>
}
</tbody>
</table>
<!--- mobile -->
<table class="table bg-dark-dm bg-light-lm d-md-none">
<tbody>
@foreach (var client in Model)
{
<tr class="d-flex">
<td class="bg-primary text-light">
<div>@loc["WEBFRONT_PENALTY_TEMPLATE_NAME"]</div>
<div>@loc["WEBFRONT_PROFILE_LEVEL"]</div>
<div>@loc["WEBFRONT_SEARCH_LAST_CONNECTED"]</div>
</td>
<td class="flex-grow">
<a asp-controller="Client" asp-action="Profile" asp-route-id="@client.ClientId" class="link-inverse">
<color-code value="@client.Name"></color-code>
</a>
@if (!ViewBag.Authorized && ViewBag.EnablePrivilegedUserPrivacy)
{
<div class="p-2 level-color-0">@loc["GLOBAL_PERMISSION_USER"]</div>
}
else
{
<div class="p-2 level-color-@client.LevelInt">@client.Level</div>
}
<div>@client.LastConnection.HumanizeForCurrentCulture()</div>
</td>
</tr>
}
</tbody>
</table>
</div>