From b6dd3e9ebd3be5bbb213461b4fe1ac6fe53cd1ba Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 21 May 2017 07:42:23 -0400 Subject: submitentry form --- Project-Unite/Views/Contests/ViewContest.cshtml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Project-Unite/Views/Contests/ViewContest.cshtml') 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 @@

Want to win this contest?

- - @if (Model.IsEnded) + @if (!Model.UserSubmitted(User.Identity.GetUserId())) { + if (Model.IsEnded) + {

Unfortunately, this contest has ended and you cannot submit an entry. Perhaps there's another contest still going?

+ } + else + { +

Good news! This contest is still open. Hurry and submit your entry!

+ + Go, go, go! Submit an entry! + } } else { -

Good news! This contest is still open. Hurry and submit your entry!

- - Go, go, go! Submit an entry! +

You have already submitted an entry for this contest.

}

Current winners:

-- cgit v1.2.3