Nu går det fint att skapa tournaments med teams och prizes

This commit is contained in:
2020-05-06 22:58:06 +02:00
parent 9596d9aa47
commit dc4162db95
12 changed files with 228 additions and 35 deletions

View File

@ -6,35 +6,35 @@
<div class="row">
<div class="col-md-8">
<div class="jumbotron">
<h1>Office Fun!</h1>
<p class="lead">Track your in office tournament easily and have a great time doing it.</p>
<p><a href="https://asp.net" class="btn btn-primary btn-lg">Create a tournament</a></p>
<div class="row">
<div class="col-md-8">
<div class="jumbotron">
<h1>Office Fun!</h1>
<p class="lead">Track your in office tournament easily and have a great time doing it.</p>
<p>@Html.ActionLink("Create a Tournament", "Create", "Tournaments", new { area = "" }, new { @class = "btn btn-primary btn-lg" })</p>
</div>
<div class="row">
<div class="col-md-6">
<h2>Play with friends</h2>
<p>
Get a team and get started today on a new tournament.
</p>
</div>
<div class="row">
<div class="col-md-6">
<h2>Play with friends</h2>
<p>
Get a team and get started today on a new tournament.
</p>
</div>
<div class="col-md-6">
<h2>Win prizes</h2>
<p>Set up a tournament with prizes for first and second place and compete to win.</p>
</div>
<div class="col-md-6">
<h2>Win prizes</h2>
<p>Set up a tournament with prizes for first and second place and compete to win.</p>
</div>
</div>
<div class="col-md-4">
<h2>Current Tournament</h2>
<ul class="list-unstyled tourney-display">
@foreach (var item in Model)
{
<li><a href="/">@item.TournamentName</a></li>
}
</div>
<div class="col-md-4">
<h2>Current Tournament</h2>
<ul class="list-unstyled tourney-display">
@foreach (var item in Model)
{
<li><a href="/">@item.TournamentName</a></li>
}
</ul>
</div>
</ul>
</div>
</div>
</div>

View File

@ -33,14 +33,9 @@
<li class="nav-item">
@Html.ActionLink("Prizes", "Index", "Prizes", new { area = "" }, new { @class = "nav-link text-light" })
</li>
@*<li class="nav-item">
@Html.ActionLink("About", "About", "Home", new { area = "" }, new { @class = "nav-link text-light" })
</li>
<li class="nav-item">
@Html.ActionLink("Contact", "Contact", "Home", new { area = "" }, new { @class = "nav-link text-light" })
</li>*@
</ul>
</div>
</div>
</nav>
</header>
<div class="container">

View File

@ -0,0 +1,72 @@
@model MVCUI.Models.TournamentMVCModel
@{
ViewBag.Title = "Create";
}
<p> </p>
<h2 class="">Create New Tournament</h2>
@using (Html.BeginForm())
{
<div class="row">
@Html.AntiForgeryToken()
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="col-md-4">
<div class="form-group">
@Html.LabelFor(model => model.TournamentName, htmlAttributes: new { @class = "control-label" })
<div class="">
@Html.EditorFor(model => model.TournamentName, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.TournamentName, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.EntryFee, htmlAttributes: new { @class = "control-label" })
<div class="">
@Html.EditorFor(model => model.EntryFee, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.EntryFee, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="">
<input type="submit" value="Create" class="btn btn-dark" />
</div>
</div>
</div>
<div class="col-md-4">
@Html.LabelFor(model => model.EnteredTeams, htmlAttributes: new { @class = "control-label" })
<div class="">
@foreach (var item in Model.EnteredTeams)
{
<div class="checkbox">
<label>
<input type="checkbox" name="SelectedEnteredTeams" value="@item.Value" /> @item.Text
</label>
</div>
}
</div>
</div>
<div class="col-md-4">
@Html.LabelFor(model => model.Prizes, htmlAttributes: new { @class = "control-label" })
<div class="">
@foreach (var item in Model.Prizes)
{
<div class="checkbox">
<label>
<input type="checkbox" name="SelectedPrizes" value="@item.Value" /> @item.Text
</label>
</div>
}
</div>
</div>
</div>
}
<div>
@Html.ActionLink("Back to List", "Index")
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}