MVC-kopplingen till tournament tracker är klar
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
<ul class="list-unstyled tourney-display">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<li><a href="/">@item.TournamentName</a></li>
|
||||
<li>@Html.ActionLink(item.TournamentName,"Details","Tournaments",new { id=item.Id },new { })</li>
|
||||
}
|
||||
|
||||
</ul>
|
||||
|
||||
38
MVCUI/Views/Shared/_EditMatchup.cshtml
Normal file
38
MVCUI/Views/Shared/_EditMatchup.cshtml
Normal file
@ -0,0 +1,38 @@
|
||||
@model MVCUI.Models.MatchupMVCModel
|
||||
|
||||
@using (Html.BeginForm("EditTournamentMatchup", "Tournaments"))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
@Html.HiddenFor(model => model.MatchupId)
|
||||
@Html.HiddenFor(model => model.FirstTeamMatchupEntryId)
|
||||
@Html.HiddenFor(model => model.SecondTeamMatchupEntryId)
|
||||
@Html.HiddenFor(model => model.TournamentId)
|
||||
@Html.HiddenFor(model => model.RoundNumber)
|
||||
|
||||
<div class="form-horizontal">
|
||||
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
|
||||
<div class="form-group">
|
||||
<label class="control-label">@Model.FirstTeamName</label>
|
||||
<div class="">
|
||||
@Html.EditorFor(model => model.FirstTeamScore, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.FirstTeamScore, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">@Model.SecondTeamName</label>
|
||||
<div class="">
|
||||
@Html.EditorFor(model => model.SecondTeamScore, new { htmlAttributes = new { @class = "form-control" } })
|
||||
@Html.ValidationMessageFor(model => model.SecondTeamScore, "", new { @class = "text-danger" })
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="submit" value="Score Match" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
<hr class="alert-danger" />
|
||||
</div>
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
@model MVCUI.Models.TournamentMVCModel
|
||||
@model MVCUI.Models.TournamentMVCCreateModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Create";
|
||||
|
||||
52
MVCUI/Views/Tournaments/Details.cshtml
Normal file
52
MVCUI/Views/Tournaments/Details.cshtml
Normal 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 { })
|
||||
|
||||
@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>
|
||||
@ -7,7 +7,9 @@
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
@ -22,10 +24,8 @@
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
|
||||
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
|
||||
Reference in New Issue
Block a user