MVC-kopplingen till tournament tracker är klar

This commit is contained in:
2020-05-14 21:16:25 +02:00
parent dc4162db95
commit bd0c6f0a7c
16 changed files with 1206 additions and 931 deletions

View File

@ -1,4 +1,4 @@
@model MVCUI.Models.TournamentMVCModel
@model MVCUI.Models.TournamentMVCCreateModel
@{
ViewBag.Title = "Create";

View File

@ -0,0 +1,52 @@
@model MVCUI.Models.TournamentMVCDetailsModel
@{
ViewBag.Title = "Details";
}
<h2>Tournament: @Html.DisplayFor(model => model.TournamentName)</h2>
<div>
<hr />
<div class="row">
<div class="col-md-3">
<h2>@Html.DisplayNameFor(model => model.Rounds)</h2>
<ul class="list-unstyled tourney-display">
@foreach (var item in Model.Rounds)
{
<li>
@Html.ActionLink(item.RoundName, "Details", "Tournaments", new { roundId = item.RoundNumber }, new { })
&nbsp;
@if (item.Status == RoundStatus.Complete)
{
<span class="label label-default">completed</span>
}
else if (item.Status == RoundStatus.Active)
{
<span class="label label-success">active</span>
}
else if (item.Status == RoundStatus.Locked)
{
<span class="label label-danger">locked</span>
}
</li>
}
</ul>
</div>
<div class="col-md-9">
<div class="row">
@foreach (var item in Model.Matchups)
{
<div class="col-md-6">
@Html.Partial("_EditMatchup", item)
</div>
}
</div>
</div>
</div>
</div>
<p>
@Html.ActionLink("Back to List", "Index")
</p>