diff options
| author | Michael <[email protected]> | 2017-05-21 07:11:10 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-21 07:11:10 -0400 |
| commit | 699912bc5ff1b5b875a545b5ccb88def6c15a91f (patch) | |
| tree | 4a958a2367ce5c05fce4c2316c0145b0871079fc /Project-Unite | |
| parent | 248c3398ddfdb92d2501525758e3044200456792 (diff) | |
| download | project-unite-699912bc5ff1b5b875a545b5ccb88def6c15a91f.tar.gz project-unite-699912bc5ff1b5b875a545b5ccb88def6c15a91f.tar.bz2 project-unite-699912bc5ff1b5b875a545b5ccb88def6c15a91f.zip | |
show disqualified entries
Diffstat (limited to 'Project-Unite')
| -rw-r--r-- | Project-Unite/Models/ContestModels.cs | 2 | ||||
| -rw-r--r-- | Project-Unite/Views/Contests/ViewContest.cshtml | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Project-Unite/Models/ContestModels.cs b/Project-Unite/Models/ContestModels.cs index 6af7aca..9d8203e 100644 --- a/Project-Unite/Models/ContestModels.cs +++ b/Project-Unite/Models/ContestModels.cs @@ -97,6 +97,8 @@ namespace Project_Unite.Models public string DownloadURL { get; set; } public DateTime PostedAt { get; set; } public bool Disqualified { get; set; } + public string DisqualifiedBy { get; set; } + public string DisqualifiedReason { get; set; } public Like[] Downvotes { diff --git a/Project-Unite/Views/Contests/ViewContest.cshtml b/Project-Unite/Views/Contests/ViewContest.cshtml index 1d2593d..a460840 100644 --- a/Project-Unite/Views/Contests/ViewContest.cshtml +++ b/Project-Unite/Views/Contests/ViewContest.cshtml @@ -66,6 +66,10 @@ <div class="col-xs-8"> @Html.ActionLink(c.Name, "ViewSubmission", "Contests", new { id=c.Id}, null) <br/> <p>By @Html.UserLink(c.AuthorId) on @c.PostedAt • <span class="glyphicon glyphicon-thumbs-up"></span> @c.Upvotes.Length • <span class="glyphicon glyphicon-thumbs-down"></span> @c.Downvotes.Length</p> + @if (c.Disqualified) + { + <p><strong>This submission has been disqualified by @Html.UserLink(c.DisqualifiedBy) - Reason:</strong><br/>@c.DisqualifiedReason</p> + } </div> <div class="col-xs-4"> @if (!string.IsNullOrWhiteSpace(c.VideoId)) @@ -76,7 +80,7 @@ { <a href="@c.DownloadURL" class="btn btn-default"><span class="glyphicon-arrow-down"></span> Download</a> } - @if (User.Identity.IsAdmin()) + @if (User.Identity.IsAdmin() && c.Disqualified == false) { @Html.ActionLink("Disqualify", "Disqualify", "Contests", new { id=c.Id}, new { @class="btn btn-danger"}) } |
