Add a commit view route, nothing displayed yet
This commit is contained in:
parent
8eca3fa647
commit
ce89bded73
6 changed files with 16 additions and 5 deletions
|
@ -77,6 +77,7 @@
|
|||
/s/#ShrIdent/r/#RpIdent/s/+Texts RepoSourceR GET
|
||||
/s/#ShrIdent/r/#RpIdent/c RepoHeadChangesR GET
|
||||
/s/#ShrIdent/r/#RpIdent/c/#Text RepoChangesR GET
|
||||
/s/#ShrIdent/r/#RpIdent/p/#Text RepoPatchR GET
|
||||
/s/#ShrIdent/r/#RpIdent/d RepoDevsR GET POST
|
||||
/s/#ShrIdent/r/#RpIdent/d/!new RepoDevNewR GET
|
||||
/s/#ShrIdent/r/#RpIdent/d/#ShrIdent RepoDevR GET DELETE POST
|
||||
|
|
|
@ -25,6 +25,7 @@ module Vervis.Handler.Repo
|
|||
, getRepoSourceR
|
||||
, getRepoHeadChangesR
|
||||
, getRepoChangesR
|
||||
, getRepoPatchR
|
||||
, getRepoDevsR
|
||||
, postRepoDevsR
|
||||
, getRepoDevNewR
|
||||
|
@ -258,6 +259,13 @@ getRepoChangesR shar repo ref = do
|
|||
VCSDarcs -> getDarcsRepoChanges shar repo ref
|
||||
VCSGit -> getGitRepoChanges shar repo ref
|
||||
|
||||
getRepoPatchR :: ShrIdent -> RpIdent -> Text -> Handler Html
|
||||
getRepoPatchR shr rp ref = do
|
||||
repository <- runDB $ selectRepo shr rp
|
||||
case repoVcs repository of
|
||||
VCSDarcs -> undefined -- getDarcsPatch shr rp ref
|
||||
VCSGit -> undefined -- getGitRepoPatch shr rp ref
|
||||
|
||||
getRepoDevsR :: ShrIdent -> RpIdent -> Handler Html
|
||||
getRepoDevsR shr rp = do
|
||||
devs <- runDB $ do
|
||||
|
|
|
@ -86,7 +86,7 @@ getDarcsRepoHeadChanges shar repo = do
|
|||
case mv of
|
||||
Nothing -> notFound
|
||||
Just v -> return v
|
||||
let changes = changesW entries
|
||||
let changes = changesW shar repo entries
|
||||
pageNav = navWidget navModel
|
||||
feed = changeFeed shar repo Nothing VCSDarcs entries
|
||||
selectRep $ do
|
||||
|
|
|
@ -100,7 +100,7 @@ getGitRepoChanges shar repo ref = do
|
|||
(entries, navModel) <- getPageAndNav $
|
||||
\ o l -> liftIO $ G.readChangesView path ref o l
|
||||
let refSelect = refSelectW shar repo branches tags
|
||||
changes = changesW entries
|
||||
changes = changesW shar repo entries
|
||||
pageNav = navWidget navModel
|
||||
feed = changeFeed shar repo (Just ref) VCSGit entries
|
||||
selectRep $ do
|
||||
|
|
|
@ -34,5 +34,5 @@ import Vervis.Settings (widgetFile)
|
|||
refSelectW :: ShrIdent -> RpIdent -> Set Text -> Set Text -> Widget
|
||||
refSelectW shar repo branches tags = $(widgetFile "repo/widget/ref-select")
|
||||
|
||||
changesW :: Foldable f => f LogEntry -> Widget
|
||||
changesW entries = $(widgetFile "repo/widget/changes")
|
||||
changesW :: Foldable f => ShrIdent -> RpIdent -> f LogEntry -> Widget
|
||||
changesW shr rp entries = $(widgetFile "repo/widget/changes")
|
||||
|
|
|
@ -21,6 +21,8 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|||
$forall LogEntry author hash message (_, time) <- entries
|
||||
<tr>
|
||||
<td>#{author}
|
||||
<td .hash>#{T.take 10 hash}
|
||||
<td .hash>
|
||||
<a href=@{RepoPatchR shr rp hash}>
|
||||
#{T.take 10 hash}
|
||||
<td>#{message}
|
||||
<td>#{time}
|
||||
|
|
Loading…
Reference in a new issue