UI: List projectless repos and "Create New" link in personal overview page
This commit is contained in:
parent
02337c39e1
commit
271bc3dbd0
3 changed files with 20 additions and 5 deletions
|
@ -83,12 +83,18 @@ intro = do
|
|||
|
||||
personalOverview :: Entity Person -> Handler Html
|
||||
personalOverview (Entity _pid person) = do
|
||||
(ident, projects) <- runDB $ do
|
||||
(ident, projects, repos) <- runDB $ do
|
||||
let sid = personIdent person
|
||||
sharer <- get404 sid
|
||||
projs <- selectList [ProjectSharer ==. sid] [Asc ProjectIdent]
|
||||
let pi (Entity _ proj) = projectIdent proj
|
||||
return (sharerIdent sharer, map pi projs)
|
||||
prjs <-
|
||||
map (projectIdent . entityVal) <$>
|
||||
selectList [ProjectSharer ==. sid] [Asc ProjectIdent]
|
||||
rps <-
|
||||
map (repoIdent . entityVal) <$>
|
||||
selectList
|
||||
[RepoSharer ==. sid, RepoProject ==. Nothing]
|
||||
[Asc RepoIdent]
|
||||
return (sharerIdent sharer, prjs, rps)
|
||||
defaultLayout $ do
|
||||
setTitle "Vervis > Overview"
|
||||
$(widgetFile "personal-overview")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$# This file is part of Vervis.
|
||||
$#
|
||||
$# Written in 2016 by fr33domlover <fr33domlover@riseup.net>.
|
||||
$# Written in 2016, 2019 by fr33domlover <fr33domlover@riseup.net>.
|
||||
$#
|
||||
$# ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
$#
|
||||
|
|
|
@ -27,6 +27,15 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|||
<li>
|
||||
<a href=@{ProjectNewR ident}>Create new…
|
||||
|
||||
<li>
|
||||
<p>Standalone repos:
|
||||
<ul>
|
||||
$forall repo <- repos
|
||||
<li>
|
||||
<a href=@{RepoR ident repo}>#{rp2text repo}
|
||||
<li>
|
||||
<a href=@{RepoNewR ident}>Create new…
|
||||
|
||||
<li>
|
||||
<a href=@{SharerInboxR ident}>Inbox
|
||||
|
||||
|
|
Loading…
Reference in a new issue