From 248c3398ddfdb92d2501525758e3044200456792 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 21 May 2017 07:06:08 -0400 Subject: correct some permissions for contests --- Project-Unite/Views/Contests/ViewContest.cshtml | 51 +++++++++++++++++++++---- 1 file changed, 44 insertions(+), 7 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 a78cdbc..1d2593d 100644 --- a/Project-Unite/Views/Contests/ViewContest.cshtml +++ b/Project-Unite/Views/Contests/ViewContest.cshtml @@ -25,15 +25,15 @@ @if (!string.IsNullOrWhiteSpace(Model.VideoId)) { - - if (Model.IsEnded) - { + } + @if (Model.IsEnded) + {

This contest has ended on @Model.EndsAt

- } - else - { + } + else + {

This contest is open - and will be closed at @Model.EndsAt

- } + }

@Html.Markdown(Model.Description)

@@ -46,6 +46,43 @@
Bronze:
@Model.CodepointReward3rd Codepoints
+ +

Submissions

+

Below is a list of all submissions for this contest.

+ +
+
Submission
+
Actions
+
+ @if(Model.Entries.Length == 0) + { +

There are no submissions for this contest. Be the first!

+ } + else + { + foreach(var c in Model.Entries) + { +
+
+ @Html.ActionLink(c.Name, "ViewSubmission", "Contests", new { id=c.Id}, null)
+

By @Html.UserLink(c.AuthorId) on @c.PostedAt • @c.Upvotes.Length • @c.Downvotes.Length

+
+
+ @if (!string.IsNullOrWhiteSpace(c.VideoId)) + { + Watch video + } + @if (!string.IsNullOrWhiteSpace(c.DownloadURL)) + { + Download + } + @if (User.Identity.IsAdmin()) + { + @Html.ActionLink("Disqualify", "Disqualify", "Contests", new { id=c.Id}, new { @class="btn btn-danger"}) + } +
+
+ } }
-- cgit v1.2.3