Show links to the cgit pages for repositories on the index page
This commit is contained in:
parent
05db0a87f9
commit
7f8ffb4bea
2 changed files with 9 additions and 3 deletions
|
|
@ -14,7 +14,7 @@
|
|||
(exec-query
|
||||
conn
|
||||
(string-append
|
||||
"SELECT id, label, url FROM git_repositories ORDER BY id ASC")))
|
||||
"SELECT id, label, url, cgit_url_base FROM git_repositories ORDER BY id ASC")))
|
||||
|
||||
(define (select-git-repository conn id)
|
||||
(match (exec-query
|
||||
|
|
|
|||
|
|
@ -233,12 +233,18 @@
|
|||
(h1 "Guix Data Service")))
|
||||
,@(map
|
||||
(match-lambda
|
||||
(((repository-id label url) . branches-with-most-recent-commits)
|
||||
(((repository-id label url cgit-url-base) . branches-with-most-recent-commits)
|
||||
`(div
|
||||
(@ (class "row"))
|
||||
(div
|
||||
(@ (class "col-sm-12"))
|
||||
(h3 ,url)
|
||||
(h3 (@ (style "display: inline-block;"))
|
||||
,url)
|
||||
,@(if (string-null? cgit-url-base)
|
||||
'()
|
||||
`((a (@ (style "padding-left: 0.8em;")
|
||||
(href ,cgit-url-base))
|
||||
"(View cgit)")))
|
||||
,(if (null? branches-with-most-recent-commits)
|
||||
'(p "No branches")
|
||||
(table/branches-with-most-recent-commits
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue