2022-04-19 19:43:58 -04:00
|
|
|
@using WebfrontCore.ViewModels
|
|
|
|
@model IEnumerable<WebfrontCore.ViewModels.ScoreboardInfo>
|
2022-04-20 09:39:16 -04:00
|
|
|
@{
|
|
|
|
var selectedServer = Model?.FirstOrDefault(server => server.ServerId == ViewBag.SelectedServerId) ?? Model?.First();
|
|
|
|
}
|
2022-01-22 13:49:12 -05:00
|
|
|
|
2022-04-19 19:43:58 -04:00
|
|
|
<div class="content mt-20 row">
|
|
|
|
<div class="col-12 col-lg-9 col-xl-10">
|
|
|
|
@if (Model is not null)
|
|
|
|
{
|
|
|
|
<div class=" scoreboard-container" data-server-id="@ViewBag.SelectedServerId">
|
2022-04-20 09:39:16 -04:00
|
|
|
<partial name="_Scoreboard" for="@selectedServer"/>
|
2022-04-19 19:43:58 -04:00
|
|
|
</div>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
@{
|
|
|
|
var menuItems = new SideContextMenuItems
|
|
|
|
{
|
|
|
|
MenuTitle = "Server", Items = Model.Select(server => new SideContextMenuItem
|
|
|
|
{
|
|
|
|
IsLink = true,
|
|
|
|
Reference = Url.Action("Scoreboard", "Server", new { serverId = server.ServerId }),
|
|
|
|
Title = server.ServerName.StripColors(),
|
|
|
|
IsActive = ViewBag.SelectedServerId == server.ServerId
|
|
|
|
}).ToList()
|
|
|
|
};
|
2022-01-22 13:49:12 -05:00
|
|
|
}
|
2022-04-19 19:43:58 -04:00
|
|
|
<partial name="_SideContextMenu" for="@menuItems"></partial>
|
2022-01-22 13:49:12 -05:00
|
|
|
</div>
|
|
|
|
|
|
|
|
@section scripts {
|
|
|
|
<environment include="Development">
|
|
|
|
<script type="text/javascript" src="~/js/scoreboard.js" defer="defer"></script>
|
|
|
|
</environment>
|
|
|
|
}
|