Link to cgit on the comparison page

This commit is contained in:
Christopher Baines 2019-07-29 20:40:56 +01:00
parent b075a71d1e
commit 91e0527b4d
2 changed files with 16 additions and 3 deletions

View file

@ -386,6 +386,10 @@
(render-html (render-html
#:sxml (compare base-commit #:sxml (compare base-commit
target-commit target-commit
(guix-revisions-cgit-url-bases
conn
(list base-revision-id
target-revision-id))
new-packages new-packages
removed-packages removed-packages
version-changes) version-changes)

View file

@ -1174,6 +1174,7 @@
(define (compare base-commit (define (compare base-commit
target-commit target-commit
cgit-url-bases
new-packages new-packages
removed-packages removed-packages
version-changes) version-changes)
@ -1189,12 +1190,20 @@
(div (div
(@ (class "row")) (@ (class "row"))
(div (div
(@ (class "col-sm-12")) (@ (class "col-sm-8"))
(h1 (@ (class "pull-left")) (h1 "Comparing "
"Comparing "
(samp ,(string-take base-commit 8) "…") (samp ,(string-take base-commit 8) "…")
" and " " and "
(samp ,(string-take target-commit 8) "…")) (samp ,(string-take target-commit 8) "…"))
,@(if (apply string=? cgit-url-bases)
`((a (@ (href ,(string-append
(first cgit-url-bases)
"log/?qt=range&q="
base-commit ".." target-commit)))
"(View cgit)"))
'()))
(div
(@ (class "col-sm-4"))
(div (div
(@ (class "btn-group-vertical btn-group-lg pull-right") (@ (class "btn-group-vertical btn-group-lg pull-right")
(style "margin-top: 2em;") (style "margin-top: 2em;")