gonito/templates/show-challenge.hamlet

46 lines
1.8 KiB
Plaintext

<p> Git repo URL: <tt style="background-color: #eeeeee";>#{repoUrl repo}</tt> / Branch: <tt style="background-color: #eeeeee";> #{repoBranch repo}</tt>
<br>Run <tt style="background-color: #eeeeee";>git clone --single-branch #{repoUrl repo} -b #{repoBranch repo}</tt> to get the challenge data
$maybe repoLink <- maybeRepoLink
<br>Browse at <tt><a href="#{repoLink}">#{repoLink}</a></tt>
$nothing
$if (challengeArchived challenge == Just True)
<p><b>_{MsgChallengeIsArchived}
$if (checkIfAdmin mUserEnt)
$if (challengeArchived challenge /= Just True)
<form method=post action=@{ArchiveR challengeId}#form enctype="text/plain">
<button>_{MsgArchive}
<form method=get action=@{ChallengeUpdateR challengeId}#form enctype="text/plain">
<button>_{MsgUpdate}
<form method=get action=@{TestChallengeAnnouncementsR (challengeName challenge)}#form enctype="text/plain">
<button>_{MsgTestChallengeAnnouncements}
$if (challengeArchived challenge == Just True)
<form method=post action=@{UnarchiveR challengeId}#form enctype="text/plain">
<button>_{MsgUnarchive}
$if not isHealthy
_{MsgChallengeNotHealthy} <form method=post action=@{HealR challengeId}#form enctype="text/plain">
<button>_{MsgHeal}
<h2>Leaderboard
$if null tests
<p>_{MsgNoTests}
$else
^{Table.buildBootstrap (leaderboardTable mUserId (challengeName challenge) scheme challengeRepo tests) leaderboardWithRanks}
$maybe altLeaderboardWithRanks <- mAltLeaderboardWithRanks
$maybe altTests <- mAltTests
^{Table.buildBootstrap (altLeaderboardTable mUserId (challengeName challenge) scheme challengeRepo altTests) altLeaderboardWithRanks}
$nothing
$nothing
<div id="graph-container">
<script src="/static/js/sigma.min.js">
<script src="/static/js/sigma.parsers.json.min.js">
^{paramGraphsWidget challenge tests params}