diff options
| author | Michael <[email protected]> | 2017-05-21 07:42:23 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-21 07:42:23 -0400 |
| commit | b6dd3e9ebd3be5bbb213461b4fe1ac6fe53cd1ba (patch) | |
| tree | 56005b279279eceb135fb0a3fefc2636812b7cda /Project-Unite/Views/Contests | |
| parent | 699912bc5ff1b5b875a545b5ccb88def6c15a91f (diff) | |
| download | project-unite-b6dd3e9ebd3be5bbb213461b4fe1ac6fe53cd1ba.tar.gz project-unite-b6dd3e9ebd3be5bbb213461b4fe1ac6fe53cd1ba.tar.bz2 project-unite-b6dd3e9ebd3be5bbb213461b4fe1ac6fe53cd1ba.zip | |
submitentry form
Diffstat (limited to 'Project-Unite/Views/Contests')
| -rw-r--r-- | Project-Unite/Views/Contests/SubmitEntry.cshtml | 27 | ||||
| -rw-r--r-- | Project-Unite/Views/Contests/ViewContest.cshtml | 17 |
2 files changed, 39 insertions, 5 deletions
diff --git a/Project-Unite/Views/Contests/SubmitEntry.cshtml b/Project-Unite/Views/Contests/SubmitEntry.cshtml new file mode 100644 index 0000000..b80b3fb --- /dev/null +++ b/Project-Unite/Views/Contests/SubmitEntry.cshtml @@ -0,0 +1,27 @@ +@model Project_Unite.Models.SubmitContestEntryViewModel +@{ + ViewBag.Title = "Submit contest entry"; +} + +<h2>Submit contest entry</h2> + +<p>So you want to enter into a community contest? Alrighty, just fill out this form and we'll enter you in.</p> + +@using (Html.BeginForm()) +{ + @Html.ValidationSummary() + @Html.AntiForgeryToken() + + <dl> + <dt>Submission name:</dt> + <dd>@Html.TextBoxFor(Model=>Model.Name, new { @class = "form-control" })</dd> + <dt>Description:</dt> + <dd>@Html.TextAreaFor(Model => Model.Description, new { @class = "form-control" })</dd> + <dt>What contest is this for?</dt> + <dd>@Html.DropDownListFor(Model => Model.ContestId, Model.Contests, new { @class = "form-control" })</dd> + <dt>YouTube video ID:</dt> + <dd>If you have a YouTube video for this submission, paste its ID here! @Html.TextBoxFor(Model => Model.VideoID, new { @class = "form-control" })</dd> + <dt>Attachment:</dt> + <dd>If your submission has a download associated with it, upload it here. Please note: Only .zip files are allowed. @Html.TextBoxFor(Model => Model.Download, new { type="file", @class = "form-control" })</dd> + </dl> +}
\ No newline at end of file diff --git a/Project-Unite/Views/Contests/ViewContest.cshtml b/Project-Unite/Views/Contests/ViewContest.cshtml index a460840..886d5f4 100644 --- a/Project-Unite/Views/Contests/ViewContest.cshtml +++ b/Project-Unite/Views/Contests/ViewContest.cshtml @@ -1,4 +1,5 @@ @model Project_Unite.Models.Contest +@using Microsoft.AspNet.Identity @{ ViewBag.Title = "Contest: " + Model.Name; } @@ -91,16 +92,22 @@ </div> <div class="col-xs-3"> <h4>Want to win this contest?</h4> - - @if (Model.IsEnded) + @if (!Model.UserSubmitted(User.Identity.GetUserId())) { + if (Model.IsEnded) + { <p>Unfortunately, this contest has ended and you cannot submit an entry. Perhaps there's another contest still going?</p> + } + else + { + <p>Good news! This contest is still open. Hurry and submit your entry!</p> + + <a href="@Url.Action("SubmitEntry", "Contests", new { id = Model.Id })" class="btn-primary btn"><span class="glyphicon glyphicon-arrow-right"></span> Go, go, go! Submit an entry!</a> + } } else { - <p>Good news! This contest is still open. Hurry and submit your entry!</p> - - <a href="@Url.Action("SubmitEntry", "Contests", new {id=Model.Id})" class="btn-primary btn"><span class="glyphicon glyphicon-arrow-right"></span> Go, go, go! Submit an entry!</a> + <p>You have already submitted an entry for this contest.</p> } <h4>Current winners:</h4> |
