diff options
author | Christopher Baines <mail@cbaines.net> | 2019-07-29 20:40:56 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-07-29 20:40:56 +0100 |
commit | 91e0527b4da803c089974b6022b373cf910ecb66 (patch) | |
tree | a9818005629280cf568c29c82f4ca1b5c2144fe6 | |
parent | b075a71d1e077e644942fbc74e7200e3e81ff9be (diff) | |
download | data-service-91e0527b4da803c089974b6022b373cf910ecb66.tar data-service-91e0527b4da803c089974b6022b373cf910ecb66.tar.gz |
Link to cgit on the comparison page
-rw-r--r-- | guix-data-service/web/controller.scm | 4 | ||||
-rw-r--r-- | guix-data-service/web/view/html.scm | 15 |
2 files changed, 16 insertions, 3 deletions
diff --git a/guix-data-service/web/controller.scm b/guix-data-service/web/controller.scm index a76be6c..974722d 100644 --- a/guix-data-service/web/controller.scm +++ b/guix-data-service/web/controller.scm @@ -386,6 +386,10 @@ (render-html #:sxml (compare base-commit target-commit + (guix-revisions-cgit-url-bases + conn + (list base-revision-id + target-revision-id)) new-packages removed-packages version-changes) diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index e54f871..25d6d37 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -1174,6 +1174,7 @@ (define (compare base-commit target-commit + cgit-url-bases new-packages removed-packages version-changes) @@ -1189,12 +1190,20 @@ (div (@ (class "row")) (div - (@ (class "col-sm-12")) - (h1 (@ (class "pull-left")) - "Comparing " + (@ (class "col-sm-8")) + (h1 "Comparing " (samp ,(string-take base-commit 8) "…") " and " (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 (@ (class "btn-group-vertical btn-group-lg pull-right") (style "margin-top: 2em;") |