diff --git a/Handler/ShowChallenge.hs b/Handler/ShowChallenge.hs index 74c2a06..0b94fc0 100644 --- a/Handler/ShowChallenge.hs +++ b/Handler/ShowChallenge.hs @@ -13,7 +13,8 @@ import Handler.Shared getShowChallengeR :: Text -> Handler Html getShowChallengeR name = do (Entity _ challenge) <- runDB $ getBy404 $ UniqueName name - challengeLayout True challenge (showChallengeWidget challenge) + Just repo <- runDB $ get $ challengePublicRepo challenge + challengeLayout True challenge (showChallengeWidget challenge repo) getChallengeReadmeR :: Text -> Handler Html getChallengeReadmeR name = do @@ -24,7 +25,7 @@ getChallengeReadmeR name = do contents <- readFile readmeFilePath challengeLayout False challenge $ toWidget $ markdown def $ TL.fromStrict contents -showChallengeWidget challenge = $(widgetFile "show-challenge") +showChallengeWidget challenge repo = $(widgetFile "show-challenge") getChallengeSubmissionR :: Text -> Handler Html diff --git a/templates/show-challenge.hamlet b/templates/show-challenge.hamlet index affb12a..ed049e1 100644 --- a/templates/show-challenge.hamlet +++ b/templates/show-challenge.hamlet @@ -1 +1,4 @@ -
Raz dwa trzy +
Repo: + #{repoUrl repo} + \ Branch: + #{repoBranch repo}