Show phases
This commit is contained in:
parent
d15264b904
commit
32d00b5ec3
@ -183,9 +183,9 @@ formatSubmittingEntityInLeaderboard entry =
|
|||||||
Just teamEnt -> teamIdent $ entityVal teamEnt
|
Just teamEnt -> teamIdent $ entityVal teamEnt
|
||||||
Nothing -> formatSubmitter $ leaderboardUser entry
|
Nothing -> formatSubmitter $ leaderboardUser entry
|
||||||
|
|
||||||
|
|
||||||
versionCell :: (a -> ((Int, Int, Int), (Maybe Import.Tag))) -> Table site a
|
versionCell :: (a -> ((Int, Int, Int), (Maybe Import.Tag))) -> Table site a
|
||||||
versionCell fun = Table.text "ver." (formatVersion . fst . fun)
|
versionCell fun = Table.widget "ver." (
|
||||||
|
\e -> fragmentWithTag (formatVersion $ fst $ fun e) (snd $ fun e))
|
||||||
|
|
||||||
leaderboardTable :: Maybe UserId -> Text -> RepoScheme -> Repo -> [Entity Test] -> Table App (Int, LeaderboardEntry)
|
leaderboardTable :: Maybe UserId -> Text -> RepoScheme -> Repo -> [Entity Test] -> Table App (Int, LeaderboardEntry)
|
||||||
leaderboardTable mauthId challengeName repoScheme challengeRepo tests = mempty
|
leaderboardTable mauthId challengeName repoScheme challengeRepo tests = mempty
|
||||||
|
@ -50,6 +50,18 @@ $forall ((Entity _ v), (Entity sid s)) <- tagEnts
|
|||||||
\ <span class="label #{tagClass $ submissionTagAccepted s}" onclick="t=$(this); $.get('/toggle-submission-tag/#{toPathPiece sid}', function(data){ if (!(data == 'BLOCKED')) {t.removeClass('#{allTagClasses}'); t.addClass(data);} }); ">#{tagName v}</span>
|
\ <span class="label #{tagClass $ submissionTagAccepted s}" onclick="t=$(this); $.get('/toggle-submission-tag/#{toPathPiece sid}', function(data){ if (!(data == 'BLOCKED')) {t.removeClass('#{allTagClasses}'); t.addClass(data);} }); ">#{tagName v}</span>
|
||||||
|]
|
|]
|
||||||
|
|
||||||
|
|
||||||
|
fragmentWithTag :: Text.Blaze.ToMarkup a => a -> Maybe Import.Tag -> WidgetFor site ()
|
||||||
|
fragmentWithTag t mTag = [whamlet|
|
||||||
|
#{t}
|
||||||
|
$maybe tag <- mTag
|
||||||
|
$maybe color <- tagColor tag
|
||||||
|
\ <span style="background-color: #{color};" class="label label-default">#{tagName tag}</span>
|
||||||
|
$nothing
|
||||||
|
\ <span class="label label-default">#{tagName tag}</span>
|
||||||
|
|]
|
||||||
|
|
||||||
|
|
||||||
allTagClasses :: Text
|
allTagClasses :: Text
|
||||||
allTagClasses = (tagClass $ Just True) <> " " <> (tagClass $ Just False) <> " " <> (tagClass $ Nothing);
|
allTagClasses = (tagClass $ Just True) <> " " <> (tagClass $ Just False) <> " " <> (tagClass $ Nothing);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user