IW4M-Admin/WebfrontCore/Views/Client/Message/_Item.cshtml

60 lines
2.3 KiB
Plaintext
Raw Normal View History

@using SharedLibraryCore.Dtos.Meta.Responses
@model IEnumerable<MessageResponse>
@foreach (var message in Model)
{
<!-- desktop -->
<tr class="d-none d-lg-table-row">
2022-04-19 19:43:58 -04:00
<td colspan="20%" class="text-break">
<a asp-controller="Client" asp-action="Profile" asp-route-id="@message.ClientId" class="link-inverse">
2022-01-22 13:49:12 -05:00
<color-code value="@message.ClientName"></color-code>
</a>
</td>
2022-04-19 19:43:58 -04:00
<td colspan="45%" class="text-break">
@if (message.IsHidden && !ViewBag.Authorized)
{
2022-04-19 19:43:58 -04:00
<color-code value="@Utilities.FormatExt(ViewBag.Localization["WEBFRONT_CLIENT_META_CHAT_HIDDEN"], message.HiddenMessage)"></color-code>
}
else
{
2022-01-22 13:49:12 -05:00
<color-code value="@message.Message"></color-code>
}
</td>
2022-04-19 19:43:58 -04:00
<td colspan="20%" class="text-break">
2022-01-22 13:49:12 -05:00
<color-code value="@(message.ServerName ?? "--")"></color-code>
</td>
2022-04-19 19:43:58 -04:00
<td colspan="15%" class="text-right text-break">
2022-07-05 13:42:17 -04:00
@message.When.ToStandardFormat()
</td>
</tr>
<!-- mobile -->
2022-04-19 19:43:58 -04:00
<tr class="d-flex d-lg-none">
<td class="bg-primary text-light">
<div>@ViewBag.Localization["WEBFRONT_PENALTY_TEMPLATE_ADMIN"]</div>
<div>@ViewBag.Localization["WEBFRONT_ACTION_LABEL_MESSAGE"]</div>
<div>@ViewBag.Localization["WEBFRONT_STATS_MESSAGE_SERVER_NAME"]</div>
<div>@ViewBag.Localization["WEBFRONT_ADMIN_AUDIT_LOG_TIME"]</div>
</td>
<td class="flex-fill">
<a asp-controller="Client" asp-action="Profile" asp-route-id="@message.ClientId">
2022-01-22 13:49:12 -05:00
<color-code value="@message.ClientName"></color-code>
</a>
2022-04-19 19:43:58 -04:00
<div>
@if (message.IsHidden && !ViewBag.Authorized)
{
<color-code value="@Utilities.FormatExt(ViewBag.Localization["WEBFRONT_CLIENT_META_CHAT_HIDDEN"], message.HiddenMessage)"></color-code>
}
else
{
<color-code value="@message.Message"></color-code>
}
</div>
<div>
<color-code value="@(message.ServerName ?? "--")"></color-code>
</div>
2022-07-05 13:42:17 -04:00
<div>@message.When.ToStandardFormat()</div>
</td>
</tr>
2022-01-22 13:49:12 -05:00
}