Link to the comparison page from the branch page

To allow easily comparing revisions.
This commit is contained in:
Christopher Baines 2019-07-29 21:11:45 +01:00
parent ef123dcded
commit 1724bc485f

View file

@ -789,15 +789,17 @@
(div (div
(@ (class "col-md-12")) (@ (class "col-md-12"))
(table (table
(@ (class "table table-responsive")) (@ (class "table table-responsive")
(style "table-layout: fixed;"))
(thead (thead
(tr (tr
(th (@ (class "col-md-3")) "Date") (th (@ (class "col-md-3")) "Date")
(th (@ (class "col-md-3")) "Commit"))) (th (@ (class "col-md-7")) "Commit")
(th (@ (class "col-md-1")))))
(tbody (tbody
,@(map ,@(map
(match-lambda (match-lambda*
((commit date revision-exists? job-events) (((commit date revision-exists? job-events) previous-commit)
`(tr `(tr
(td ,date) (td ,date)
(td ,@(if (string=? commit "NULL") (td ,@(if (string=? commit "NULL")
@ -816,8 +818,26 @@
"Failed to import data")) "Failed to import data"))
(else (else
'(span (@ (class "label label-default")) '(span (@ (class "label label-default"))
"No information yet"))))))))) "No information yet"))))))
branch-commits))))))))) ,@(if previous-commit
`((td
(@ (style "vertical-align: middle;")
(rowspan "2"))
(div
(@ (class "btn-group")
(role "group"))
(a (@ (class "btn btn-sm btn-default")
(title "Compare")
(href ,(string-append
"/compare"
"?base_commit=" previous-commit
"&target_commit=" commit)))
"⇕ Compare"))))
'()))))
branch-commits
(append (map first (cdr branch-commits))
(list #f)))))))))))
(define (view-builds stats builds) (define (view-builds stats builds)
(layout (layout