mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 23:31:13 -05:00
add translation for webfront
discord link has been genericized to social link
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
@model List<SharedLibraryCore.Dtos.PlayerInfo>
|
||||
@{
|
||||
var loc = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex;
|
||||
}
|
||||
|
||||
<div class="mr-auto ml-auto col-12 col-lg-7 border-bottom">
|
||||
<h4 class="pb-2 text-center ">@ViewBag.Title</h4>
|
||||
<div class="row pt-2 pb-2 bg-primary">
|
||||
<div class="col-5 ">Name </div>
|
||||
<div class="col-4">Level</div>
|
||||
<div class="col-3 text-right">Last Seen</div>
|
||||
<div class="col-5 ">@loc["WEBFRONT_PENALTY_TEMPLATE_NAME"]</div>
|
||||
<div class="col-4">@loc["WEBFRONT_PROFILE_LEVEL"]</div>
|
||||
<div class="col-3 text-right">@loc["WEBFRONT_PROFILE_LSEEN"]</div>
|
||||
</div>
|
||||
|
||||
@{
|
||||
@ -14,7 +17,7 @@
|
||||
<div class="row pt-2 pb-2 bg-dark">
|
||||
<div class="col-5">@Html.ActionLink(client.Name, "ProfileAsync", "Client", new { id = client.ClientId })</div>
|
||||
<div class="col-4 level-color-@client.Level.ToLower()">@client.Level</div>
|
||||
<div class="col-3 text-right">@client.LastSeen ago</div>
|
||||
<div class="col-3 text-right">@client.LastSeen @loc["WEBFRONT_PENALTY_TEMPLATE_AGO"]</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
@{
|
||||
string match = System.Text.RegularExpressions.Regex.Match(Model.Name.ToUpper(), "[A-Z]").Value;
|
||||
string shortCode = match == string.Empty ? "?" : match;
|
||||
var loc = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex;
|
||||
}
|
||||
<div id="profile_wrapper" class="row d-flex d-sm-inline-flex justify-content-center justify-content-left pb-3">
|
||||
<div class="mr-auto ml-auto ml-sm-0 mr-sm-0">
|
||||
@ -30,13 +31,13 @@
|
||||
<div id="profile_aliases_btn" class="oi oi-caret-bottom h3 ml-0 ml-md-2"></div>
|
||||
|
||||
@if (Model.LevelInt < (int)ViewBag.User.Level &&
|
||||
(SharedLibraryCore.Objects.Player.Permission)Model.LevelInt != SharedLibraryCore.Objects.Player.Permission.Banned)
|
||||
(SharedLibraryCore.Objects.Player.Permission)Model.LevelInt != SharedLibraryCore.Objects.Player.Permission.Banned)
|
||||
{
|
||||
<div id="profile_action_ban_btn" class="profile-action oi oi-lock-unlocked text-success h3 ml-2" title="Ban Client" data-action="ban" aria-hidden="true"></div>
|
||||
}
|
||||
|
||||
@if (Model.LevelInt < (int)ViewBag.User.Level &&
|
||||
(SharedLibraryCore.Objects.Player.Permission)Model.LevelInt == SharedLibraryCore.Objects.Player.Permission.Banned)
|
||||
(SharedLibraryCore.Objects.Player.Permission)Model.LevelInt == SharedLibraryCore.Objects.Player.Permission.Banned)
|
||||
{
|
||||
<div id="profile_action_unban_btn" class="profile-action oi oi-lock-locked text-danger h3 ml-2" title="Unban Client" data-action="unban" aria-hidden="true"></div>
|
||||
}
|
||||
@ -44,6 +45,7 @@
|
||||
|
||||
<div id="profile_aliases" class="pr-0 pr-sm-4 pb-2 mb-2 text-muted order-0">
|
||||
@{
|
||||
@Model.NetworkId.ToString("X") <br/>
|
||||
foreach (string alias in Model.Aliases)
|
||||
{
|
||||
@alias <br />
|
||||
@ -65,13 +67,13 @@
|
||||
<h5><span class="level-color-@Model.Level.ToLower()"><strong>@Model.Level</strong></span></h5>
|
||||
</div>
|
||||
<div id="profile_time_played" class="text-muted">
|
||||
Played <span class="text-primary">@Model.TimePlayed</span> hours
|
||||
@loc["WEBFRONT_PROFILE_PLAYER"] <span class="text-primary">@Model.TimePlayed</span> @loc["GLOBAL_HOURS"]
|
||||
</div>
|
||||
<div id="profile_first_seen" class="text-muted">
|
||||
First seen <span class="text-primary">@Model.FirstSeen</span> ago
|
||||
@loc["WEBFRONT_PROFILE_FSEEN"] <span class="text-primary">@Model.FirstSeen</span> @loc["WEBFRONT_PENALTY_TEMPLATE_AGO"]
|
||||
</div>
|
||||
<div id="profile_last_seen" class="text-muted">
|
||||
Last seen <span class="text-primary">@Model.LastSeen</span> ago
|
||||
@loc["WEBFRONT_PROFILE_LSEEN"] <span class="text-primary">@Model.LastSeen</span> @loc["WEBFRONT_PENALTY_TEMPLATE_AGO"]
|
||||
</div>
|
||||
</div>
|
||||
<div id="profile_meta" class="text-center text-sm-right pt-2 mt-md-4 pt-md-3 mr-4 pr-4 mr-md-0 ml-4 pl-4 ml-md-0 pr-md-0 pl-md-0">
|
||||
@ -81,12 +83,6 @@
|
||||
|
||||
<div class="row d-md-flex pt-2">
|
||||
<div id="profile_events" class="text-muted text-left ml-sm-0">
|
||||
@{
|
||||
if (Model.Meta.Count == 0)
|
||||
{
|
||||
<span> No recent events</span>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
<input id="console_command_value" class="form-control m-0 bg-dark text-light" type="text" />
|
||||
</div>
|
||||
<div class="col pl-1 pl-sm-0">
|
||||
<button id="console_command_button" class="btn btn-primary btn-block m-0">Execute</button>
|
||||
<button id="console_command_button" class="btn btn-primary btn-block m-0">@SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_CONSOLE_EXECUTE"]</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +1,7 @@
|
||||
@model SharedLibraryCore.Objects.Penalty.PenaltyType
|
||||
|
||||
@{
|
||||
var loc = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex;
|
||||
}
|
||||
<h4 class="pb-2 text-center ">@ViewBag.Title</h4>
|
||||
<div class="row">
|
||||
<select class="form-control bg-dark text-muted" id="penalty_filter_selection">
|
||||
@ -10,22 +12,22 @@
|
||||
{
|
||||
if (Model == SharedLibraryCore.Objects.Penalty.PenaltyType.Any)
|
||||
{
|
||||
<option value="@Convert.ToInt32(penaltyType)" selected="selected" )>Show @penaltyType.ToString()</option>
|
||||
<option value="@Convert.ToInt32(penaltyType)" selected="selected" )>@loc["WEBFRONT_PENALTY_TEMPLATE_SHOW"] @penaltyType.ToString()</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@Convert.ToInt32(penaltyType)" )>Show @penaltyType.ToString()</option>
|
||||
<option value="@Convert.ToInt32(penaltyType)" )>@loc["WEBFRONT_PENALTY_TEMPLATE_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>
|
||||
<option value="@Convert.ToInt32(penaltyType)" selected="selected">@loc["WEBFRONT_PENALTY_TEMPLATE_SHOWONLY"] @penaltyType.ToString()s</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@Convert.ToInt32(penaltyType)" )>Show only @penaltyType.ToString()s</option>
|
||||
<option value="@Convert.ToInt32(penaltyType)" )>@loc["WEBFRONT_PENALTY_TEMPLATE_SHOWONLY"] @penaltyType.ToString()s</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -36,11 +38,11 @@
|
||||
<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>
|
||||
<th scope="col">@loc["WEBFRONT_PENALTY_TEMPLATE_NAME"]</th>
|
||||
<th scope="col">@loc["WEBFRONT_PENALTY_TEMPLATE_TYPE"]</th>
|
||||
<th scope="col">@loc["WEBFRONT_PENALTY_TEMPLATE_OFFENSE"]</th>
|
||||
<th scope="col">@loc["WEBFRONT_PENALTY_TEMPLATE_ADMIN"]</th>
|
||||
<th scope="col" class="text-right">@loc["WEBFRONT_PENALTY_TEMPLATE_TIME"]</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="penalty_table" class="border-bottom bg-dark">
|
||||
|
@ -1,48 +1,49 @@
|
||||
@{
|
||||
Layout = null;
|
||||
var loc = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex;
|
||||
}
|
||||
|
||||
@model SharedLibraryCore.Dtos.PenaltyInfo
|
||||
|
||||
<tr class="d-table-row d-md-none bg-dark">
|
||||
<th scope="row" class="bg-primary">Name</th>
|
||||
<th scope="row" class="bg-primary">@loc["WEBFRONT_PENALTY_TEMPLATE_NAME"]</th>
|
||||
<td>
|
||||
@Html.ActionLink(Model.OffenderName, "ProfileAsync", "Client", new { id = Model.OffenderId }, new { @class = "link-inverse" })
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="d-table-row d-md-none bg-dark">
|
||||
<th scope="row" class="bg-primary">Type</th>
|
||||
<th scope="row" class="bg-primary">@loc["WEBFRONT_PENALTY_TEMPLATE_TYPE"]</th>
|
||||
<td class="penalties-color-@Model.Type.ToLower()">
|
||||
@Model.Type
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="d-table-row d-md-none bg-dark">
|
||||
<th scope="row" class="bg-primary">Offense</th>
|
||||
<th scope="row" class="bg-primary">@loc["WEBFRONT_PENALTY_TEMPLATE_OFFENSE"]</th>
|
||||
<td class="text-light">
|
||||
@Model.Offense
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="d-table-row d-md-none bg-dark">
|
||||
<th scope="row" class="bg-primary">Admin</th>
|
||||
<th scope="row" class="bg-primary">@loc["WEBFRONT_PENALTY_TEMPLATE_ADMIN"]</th>
|
||||
<td>
|
||||
@Html.ActionLink(Model.PunisherName, "ProfileAsync", "Client", new { id = Model.PunisherId }, new { @class = "level-color-" + Model.PunisherLevel.ToLower() })
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="d-table-row d-md-none bg-dark">
|
||||
<th scope="row" class="w-25 bg-primary" style="border-bottom: 1px solid #222">Time/Left</th>
|
||||
<th scope="row" class="w-25 bg-primary" style="border-bottom: 1px solid #222">@loc["WEBFRONT_PENALTY_TEMPLATE_TIME"]</th>
|
||||
<td class="text-light mb-2 border-bottom">
|
||||
@{
|
||||
if (Model.TimeRemaining == string.Empty)
|
||||
{
|
||||
<span>@Model.TimePunished ago</span>
|
||||
<span>@Model.TimePunished @loc["WEBFRONT_PENALTY_TEMPLATE_AGO"]</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span> @Model.TimeRemaining left</span>
|
||||
<span> @Model.TimeRemaining @loc["WEBFRONT_PENALTY_TEMPLATE_REMAINING"]</span>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
@ -65,11 +66,11 @@
|
||||
@{
|
||||
if (Model.TimeRemaining == string.Empty)
|
||||
{
|
||||
<span>@Model.TimePunished ago</span>
|
||||
<span>@Model.TimePunished @loc["WEBFRONT_PENALTY_TEMPLATE_AGO"]</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span> @Model.TimeRemaining left</span>
|
||||
<span> @Model.TimeRemaining @loc["WEBFRONT_PENALTY_TEMPLATE_REMAINING"]</span>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
|
@ -2,5 +2,5 @@
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h4 class="text-danger">Sorry!</h4>
|
||||
<h4 class="text-danger">An error occurred while processing your request.</h4>
|
||||
<h4 class="text-danger">@SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_ERROR_GENERIC_TITLE"]</h4>
|
||||
<h4 class="text-danger">@SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex["WEBFRONT_ERROR_GENERIC_DESC"]</h4>
|
||||
|
@ -1,4 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
@{
|
||||
var loc = SharedLibraryCore.Utilities.CurrentLocalization.LocalizationIndex;
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
@ -32,13 +35,13 @@
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item text-center text-md-left">@Html.ActionLink("Home", "Index", "Home", new { area = "" }, new { @class = "nav-link" })</li>
|
||||
<li class="nav-item text-center text-md-left">@Html.ActionLink("Penalties", "List", "Penalty", new { area = "" }, new { @class = "nav-link" })</li>
|
||||
<li class="nav-item text-center text-md-left">@Html.ActionLink("Admins", "PrivilegedAsync", "Client", new { area = "" }, new { @class = "nav-link" })</li>
|
||||
<li class="nav-item text-center text-md-left">@Html.ActionLink(loc["WEBFRONT_NAV_HOME"], "Index", "Home", new { area = "" }, new { @class = "nav-link" })</li>
|
||||
<li class="nav-item text-center text-md-left">@Html.ActionLink(loc["WEBFRONT_NAV_PENALTIES"], "List", "Penalty", new { area = "" }, new { @class = "nav-link" })</li>
|
||||
<li class="nav-item text-center text-md-left">@Html.ActionLink(loc["WEBFRONT_NAV_PRIVILEGED"], "PrivilegedAsync", "Client", new { area = "" }, new { @class = "nav-link" })</li>
|
||||
<li class="nav-item text-center text-md-left"></li>
|
||||
@if (!string.IsNullOrEmpty(ViewBag.DiscordLink))
|
||||
@if (!string.IsNullOrEmpty(ViewBag.SocialLink))
|
||||
{
|
||||
<li class="nav-item text-center text-md-left"><a href="@ViewBag.DiscordLink" class="nav-link" target="_blank">Discord</a></li>
|
||||
<li class="nav-item text-center text-md-left"><a href="@ViewBag.SocialLink" class="nav-link" target="_blank">@ViewBag.SocialTitle</a></li>
|
||||
}
|
||||
@if (ViewBag.Authorized)
|
||||
{
|
||||
@ -46,17 +49,17 @@
|
||||
<a href="#" class="nav-link oi oi-person dropdown-toggle oi-fix-navbar w-100" id="account_dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></a>
|
||||
|
||||
<div class="dropdown-menu p-0" aria-labelledby="account_dropdown">
|
||||
@Html.ActionLink("Console", "Index", "Console", new { area = "" }, new
|
||||
@Html.ActionLink(loc["WEBFRONT_NAV_CONSOLE"], "Index", "Console", new { area = "" }, new
|
||||
{
|
||||
@class = "dropdown-item bg-dark text-muted text-center text-md-left",
|
||||
title = "Web Console"
|
||||
})
|
||||
@Html.ActionLink("Profile", "ProfileAsync", "Client", new { id = ViewBag.User.ClientId }, new
|
||||
@Html.ActionLink(loc["WEBFRONT_NAV_PROFILE"], "ProfileAsync", "Client", new { id = ViewBag.User.ClientId }, new
|
||||
{
|
||||
@class = "dropdown-item bg-dark text-muted text-center text-md-left",
|
||||
title = "Client Profile",
|
||||
})
|
||||
@Html.ActionLink("Logout", "LogoutAsync", "Account", new { area = "" }, new
|
||||
@Html.ActionLink(loc["WEBFRONT_NAV_LOGOUT"], "LogoutAsync", "Account", new { area = "" }, new
|
||||
{
|
||||
@class = "dropdown-item bg-dark text-muted text-center text-md-left",
|
||||
title = "Logout of account"
|
||||
@ -74,7 +77,7 @@
|
||||
}
|
||||
</ul>
|
||||
<form class="form-inline text-primary pt-3 pb-3" method="get" action="/Client/FindAsync">
|
||||
<input id="client_search" name="clientName" class="form-control mr-auto ml-auto mr-md-2" type="text" placeholder="Find Player" />
|
||||
<input id="client_search" name="clientName" class="form-control mr-auto ml-auto mr-md-2" type="text" placeholder="@loc["WEBFRONT_NAV_SEARCH"]" />
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
|
Reference in New Issue
Block a user