A team can be created
This commit is contained in:
parent
aa3831ee6b
commit
6377fee2e4
@ -61,6 +61,7 @@ import Handler.ExtraPoints
|
||||
import Handler.Dashboard
|
||||
import Handler.Evaluate
|
||||
import Handler.Swagger
|
||||
import Handler.Team
|
||||
|
||||
-- This line actually creates our YesodDispatch instance. It is the second half
|
||||
-- of the call to mkYesodData which occurs in Foundation.hs. Please see the
|
||||
|
@ -225,6 +225,9 @@ instance Yesod App where
|
||||
|
||||
isAuthorized (CompareFormR _ _) _ = regularAuthorization
|
||||
|
||||
isAuthorized MyTeamsR _ = isTrustedAuthorized
|
||||
isAuthorized CreateTeamR _ = isTrustedAuthorized
|
||||
|
||||
isAuthorized (TestProgressR _ _) _ = isTrustedAuthorized
|
||||
|
||||
isAuthorized SwaggerR _ = return Authorized
|
||||
|
@ -27,6 +27,9 @@
|
||||
/api/version-info/#Text VersionInfoJsonR GET
|
||||
/list-archived-challenges ListArchivedChallengesR GET
|
||||
|
||||
/my-teams MyTeamsR GET
|
||||
/create-team CreateTeamR POST
|
||||
|
||||
/challenge/#Text ShowChallengeR GET
|
||||
/challenge-readme/#Text ChallengeReadmeR GET
|
||||
/challenge-submission/#Text ChallengeSubmissionR GET POST
|
||||
|
@ -62,6 +62,7 @@ library
|
||||
Data.Diff
|
||||
Handler.Swagger
|
||||
Handler.JWT
|
||||
Handler.Team
|
||||
|
||||
if flag(dev) || flag(library-only)
|
||||
cpp-options: -DDEVELOPMENT
|
||||
|
@ -99,3 +99,6 @@ ChallengeNotHealthy: Something is wrong with the challenge data!
|
||||
Archive: Archive
|
||||
Unarchive: Unarchive
|
||||
Heal: Heal
|
||||
TeamIdent: Team name
|
||||
TeamIdentTooltip: Note that it cannot be changed later
|
||||
YourTeams: your teams
|
||||
|
@ -44,6 +44,7 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="@{YourAccountR}">_{MsgYourAccount}</a></li>
|
||||
<li><a href="@{MyScoreR}">_{MsgYourScore}</a></li>
|
||||
<li><a href="@{MyTeamsR}">_{MsgYourTeams}</a></li>
|
||||
<li><a href="@{AuthR LogoutR}">_{MsgLogOut}</a></li>
|
||||
$nothing
|
||||
<ul class="nav navbar-nav navbar-top navbar-collapse collapse">
|
||||
|
8
templates/my-teams.hamlet
Normal file
8
templates/my-teams.hamlet
Normal file
@ -0,0 +1,8 @@
|
||||
<hr>
|
||||
|
||||
<h2>Create a new team
|
||||
|
||||
<form method=post action=@{CreateTeamR}#form enctype=#{formEnctype}>
|
||||
^{formWidget}
|
||||
<button .btn .btn-primary type="submit">
|
||||
_{MsgSubmit} <span class="glyphicon glyphicon-upload"></span>
|
Loading…
Reference in New Issue
Block a user